8 #ifndef META_OCEAN_SCENEDESCRIPTION_SDX_X3D_UTILITIES_H
9 #define META_OCEAN_SCENEDESCRIPTION_SDX_X3D_UTILITIES_H
22 namespace SceneDescription
35 class OCEAN_SCENEDESCRIPTION_SDX_X3D_EXPORT
Utilities
74 static bool writeIndexedFaceSet(std::ostream& stream,
const Vectors3& vertices,
const Rendering::TriangleFaces& triangleFaces,
const RGBAColor& color =
RGBAColor(
false),
const Vectors3& perVertexNormals =
Vectors3(),
const RGBAColors& perVertexColors =
RGBAColors(),
const Vectors2& perVertexTextureCoordinates =
Vectors2(),
const std::string& textureUrl = std::string(),
const std::string& indentation = std::string(),
const unsigned int vertexPrecision = 6u,
const std::string& name = std::string());
89 static bool writeCoordinateSystem(std::ostream& stream,
const HomogenousMatrix4& world_T_coordinateSystem,
const RGBAColor& xAxisColor =
RGBAColor(1.0f, 0.0f, 0.0f),
const RGBAColor& yAxisColor =
RGBAColor(0.0f, 1.0f, 0.0f),
const RGBAColor& zAxisColor =
RGBAColor(0.0f, 0.0f, 1.0f),
const std::string& indentation = std::string(),
const std::string& name = std::string());
102 static bool writeCoordinateSystems(std::ostream& stream,
const HomogenousMatrices4& world_T_coordinateSystems,
const RGBAColor& xAxisColor =
RGBAColor(1.0f, 0.0f, 0.0f),
const RGBAColor& yAxisColor =
RGBAColor(0.0f, 1.0f, 0.0f),
const RGBAColor& zAxisColor =
RGBAColor(0.0f, 0.0f, 1.0f),
const std::string& indentation = std::string(),
const std::string& name =
"OCEAN_COORDINATE_SYSTEM");
143 static bool writeText(std::ostream& stream,
const HomogenousMatrix4& world_T_text,
const std::string& text,
const Scalar size,
const std::string& indentation = std::string(),
const std::string& name = std::string());
This class implements a color defined by red, green, blue and alpha parameters.
Definition: RGBAColor.h:41
This class implements utility functions.
Definition: scenedescription/sdx/x3d/Utilities.h:36
static bool writeCoordinateSystems(std::ostream &stream, const HomogenousMatrices4 &world_T_coordinateSystems, const RGBAColor &xAxisColor=RGBAColor(1.0f, 0.0f, 0.0f), const RGBAColor &yAxisColor=RGBAColor(0.0f, 1.0f, 0.0f), const RGBAColor &zAxisColor=RGBAColor(0.0f, 0.0f, 1.0f), const std::string &indentation=std::string(), const std::string &name="OCEAN_COORDINATE_SYSTEM")
Writes coordinate systems to an output stream.
static bool writeCone(std::ostream &stream, const HomogenousMatrix4 &world_T_cone, const Scalar height, const Scalar bottomRadius, const RGBAColor &color, const std::string &indentation=std::string(), const std::string &name=std::string())
Writes a Cone to an output stream.
static bool writePointSet(std::ostream &stream, const Vectors3 &vertices, const RGBAColor &emissiveColor=RGBAColor(false), const RGBAColors &colors=RGBAColors(), const std::string &indentation=std::string(), const unsigned int vertexPrecision=6u, const std::string &name=std::string())
Writes a shape with a PointSet geometry to an output stream.
static bool writeCoordinateSystem(std::ostream &stream, const HomogenousMatrix4 &world_T_coordinateSystem, const RGBAColor &xAxisColor=RGBAColor(1.0f, 0.0f, 0.0f), const RGBAColor &yAxisColor=RGBAColor(0.0f, 1.0f, 0.0f), const RGBAColor &zAxisColor=RGBAColor(0.0f, 0.0f, 1.0f), const std::string &indentation=std::string(), const std::string &name=std::string())
Writes a coordinate system to an output stream.
static bool writeCylinder(std::ostream &stream, const HomogenousMatrix4 &world_T_cylinder, const Scalar height, const Scalar radius, const RGBAColor &color, const std::string &indentation=std::string(), const std::string &name=std::string())
Writes a Cylinder to an output stream.
static bool writeTransformNodeStart(std::ostream &stream, const HomogenousMatrix4 &world_T_transform, const std::string &indentation=std::string(), const std::string &name=std::string())
Writes the start of a Transform node to an output stream.
static bool writeText(std::ostream &stream, const HomogenousMatrix4 &world_T_text, const std::string &text, const Scalar size, const std::string &indentation=std::string(), const std::string &name=std::string())
Writes a Text to an output stream.
static bool writeIndexedFaceSet(std::ostream &stream, const Vectors3 &vertices, const Rendering::TriangleFaces &triangleFaces, const RGBAColor &color=RGBAColor(false), const Vectors3 &perVertexNormals=Vectors3(), const RGBAColors &perVertexColors=RGBAColors(), const Vectors2 &perVertexTextureCoordinates=Vectors2(), const std::string &textureUrl=std::string(), const std::string &indentation=std::string(), const unsigned int vertexPrecision=6u, const std::string &name=std::string())
Writes a shape with an IndexdFaceSet geometry to an output stream.
static bool writeHeader(std::ostream &stream)
Writes the header of a X3D file.
std::vector< RGBAColor > RGBAColors
Definition of a vector holding rgba color objects.
Definition: RGBAColor.h:21
float Scalar
Definition of a scalar type.
Definition: Math.h:128
std::vector< HomogenousMatrix4 > HomogenousMatrices4
Definition of a vector holding HomogenousMatrix4 objects.
Definition: HomogenousMatrix4.h:73
std::vector< Vector2 > Vectors2
Definition of a vector holding Vector2 objects.
Definition: Vector2.h:64
std::vector< Vector3 > Vectors3
Definition of a vector holding Vector3 objects.
Definition: Vector3.h:65
std::vector< TriangleFace > TriangleFaces
Definition of a vector holding triangle faces.
Definition: TriangleFace.h:23
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15