1.3.49
 
Loading...
Searching...
No Matches
Geometric Primitives

Basic geometric objects to construct the domain. More...

Functions

uint helios::Context::addPatch ()
 Add new default Patch geometric primitive, which is centered at the origin (0,0,0), has unit length and width, horizontal orientation, and black color.
 
uint helios::Context::addPatch (const helios::vec3 &center, const helios::vec2 &size)
 Add new Patch geometric primitive.
 
uint helios::Context::addPatch (const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation)
 Add new Patch geometric primitive.
 
uint helios::Context::addPatch (const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const char *texture_file)
 Add new Patch geometric primitive.
 
uint helios::Context::addPatch (const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const char *texture_file, const helios::vec2 &uv_center, const helios::vec2 &uv_size)
 Add new Patch geometric primitive.
 
uint helios::Context::addTriangle (const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2)
 Add new Triangle geometric primitive.
 
uint helios::Context::addTriangle (const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2, const helios::RGBcolor &color)
 Add new Triangle geometric primitive.
 
uint helios::Context::addTriangle (const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2, const helios::RGBAcolor &color)
 Add new Triangle geometric primitive.
 
uint helios::Context::addTriangle (const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2, const char *texture_file, const helios::vec2 &uv0, const helios::vec2 &uv1, const helios::vec2 &uv2)
 Add new Triangle geometric primitive.
 
uint helios::Context::addVoxel (const helios::vec3 &center, const helios::vec3 &size)
 Add new Voxel geometric primitive.
 
uint helios::Context::addVoxel (const helios::vec3 &center, const helios::vec3 &size, const float &rotation)
 Add new Voxel geometric primitive.
 
size_t helios::Context::getPrimitiveCount (bool include_hidden_primitives=true) const
 Get the total number of Primitives in the Context.
 
size_t helios::Context::getTriangleCount (bool include_hidden_primitives=true) const
 Get the total number of triangle Primitives in the Context.
 
size_t helios::Context::getPatchCount (bool include_hidden_primitives=true) const
 Get the total number of patch Primitives in the Context.
 

Detailed Description

Basic geometric objects to construct the domain.

Function Documentation

◆ addPatch() [1/5]

uint Context::addPatch ( )

Add new default Patch geometric primitive, which is centered at the origin (0,0,0), has unit length and width, horizontal orientation, and black color.

Method to add a new default Patch to the Context

Definition at line 20 of file Context_primitive.cpp.

◆ addPatch() [2/5]

uint Context::addPatch ( const helios::vec3 center,
const helios::vec2 size 
)

Add new Patch geometric primitive.

Method to add a new Patch to the Context given its center, and size.

Parameters
[in]center3D coordinates of Patch center
[in]sizewidth and length of Patch
Returns
UUID of Patch
Note
Assumes that patch is horizontal.

Definition at line 24 of file Context_primitive.cpp.

◆ addPatch() [3/5]

uint Context::addPatch ( const helios::vec3 center,
const helios::vec2 size,
const helios::SphericalCoord rotation 
)

Add new Patch geometric primitive.

Method to add a new Patch to the Context given its center, size, and spherical rotation.

Parameters
[in]center3D coordinates of Patch center
[in]sizewidth and length of Patch
[in]rotationSpherical rotation
Returns
UUID of Patch
Note
Assumes that patch is horizontal.

Definition at line 28 of file Context_primitive.cpp.

◆ addPatch() [4/5]

uint Context::addPatch ( const helios::vec3 center,
const helios::vec2 size,
const helios::SphericalCoord rotation,
const char *  texture_file 
)

Add new Patch geometric primitive.

Method to add a new Patch to the Context given its center, size, spherical rotation, and a texture map handle.

Parameters
[in]center3D coordinates of Patch center
[in]sizewidth and length of Patch
[in]rotationSpherical rotation
[in]texture_filepath to image file (JPEG or PNG) to be used as texture
Returns
UUID of Patch

Definition at line 64 of file Context_primitive.cpp.

◆ addPatch() [5/5]

uint Context::addPatch ( const helios::vec3 center,
const helios::vec2 size,
const helios::SphericalCoord rotation,
const char *  texture_file,
const helios::vec2 uv_center,
const helios::vec2 uv_size 
)

Add new Patch geometric primitive.

Method to add a new Patch to the Context given its center, size, spherical rotation, and a texture map handle.

Parameters
[in]center3D coordinates of Patch center
[in]sizewidth and length of Patch
[in]rotationSpherical rotation
[in]texture_filepath to image file (JPEG or PNG) to be used as texture
[in]uv_centeru-v coordinates of the center of texture map
[in]uv_sizesize of the texture in u-v coordinates
Returns
UUID of Patch

Definition at line 94 of file Context_primitive.cpp.

◆ addTriangle() [1/4]

uint Context::addTriangle ( const helios::vec3 vertex0,
const helios::vec3 vertex1,
const helios::vec3 vertex2 
)

Add new Triangle geometric primitive.

Method to add a new Triangle to the Context given the (x,y,z) coordinates of its vertices.

Parameters
[in]vertex03D coordinate of Triangle vertex #0
[in]vertex13D coordinate of Triangle vertex #1
[in]vertex23D coordinate of Triangle vertex #2
Returns
UUID of Triangle

Definition at line 132 of file Context_primitive.cpp.

◆ addTriangle() [2/4]

uint Context::addTriangle ( const helios::vec3 vertex0,
const helios::vec3 vertex1,
const helios::vec3 vertex2,
const char *  texture_file,
const helios::vec2 uv0,
const helios::vec2 uv1,
const helios::vec2 uv2 
)

Add new Triangle geometric primitive.

Method to add a new Triangle to the Context given its the (x,y,z) coordinates of its vertices and diffuse RGBcolor.

Parameters
[in]vertex03D coordinate of Triangle vertex #0
[in]vertex13D coordinate of Triangle vertex #1
[in]vertex23D coordinate of Triangle vertex #2
[in]texture_filepath to image file (JPEG or PNG) to be used as texture
[in]uv0u-v texture coordinates for vertex0
[in]uv1u-v texture coordinates for vertex1
[in]uv2u-v texture coordinates for vertex2
Returns
UUID of Triangle
Note
Assumes a default color of black.

Definition at line 155 of file Context_primitive.cpp.

◆ addTriangle() [3/4]

uint Context::addTriangle ( const helios::vec3 vertex0,
const helios::vec3 vertex1,
const helios::vec3 vertex2,
const helios::RGBAcolor color 
)

Add new Triangle geometric primitive.

Method to add a new Triangle to the Context given its the (x,y,z) coordinates of its vertices and diffuse RGBAcolor.

Parameters
[in]vertex03D coordinate of Triangle vertex #0
[in]vertex13D coordinate of Triangle vertex #1
[in]vertex23D coordinate of Triangle vertex #2
[in]colordiffuse R-G-B-A color of Triangle
Returns
UUID of Triangle

Definition at line 140 of file Context_primitive.cpp.

◆ addTriangle() [4/4]

uint Context::addTriangle ( const helios::vec3 vertex0,
const helios::vec3 vertex1,
const helios::vec3 vertex2,
const helios::RGBcolor color 
)

Add new Triangle geometric primitive.

Method to add a new Triangle to the Context given its the (x,y,z) coordinates of its vertices and diffuse RGBcolor.

Parameters
[in]vertex03D coordinate of Triangle vertex #0
[in]vertex13D coordinate of Triangle vertex #1
[in]vertex23D coordinate of Triangle vertex #2
[in]colordiffuse R-G-B color of Triangle
Returns
UUID of Triangle

Definition at line 136 of file Context_primitive.cpp.

◆ addVoxel() [1/2]

uint Context::addVoxel ( const helios::vec3 center,
const helios::vec3 size 
)

Add new Voxel geometric primitive.

Method to add a new Voxel to the Context given its center, and size.

Parameters
[in]center3D coordinates of Voxel center
[in]sizewidth, length, and height of Voxel
Returns
UUID of Voxel
Note
Assumes that voxel is horizontal.

Definition at line 174 of file Context_primitive.cpp.

◆ addVoxel() [2/2]

uint Context::addVoxel ( const helios::vec3 center,
const helios::vec3 size,
const float &  rotation 
)

Add new Voxel geometric primitive.

Method to add a new Voxel to the Context given its center, size, and spherical rotation.

Parameters
[in]center3D coordinates of Voxel center
[in]sizewidth, length, and height of Voxel
[in]rotationspherical rotation angle (elevation,azimuth) in radians of Voxel
Returns
UUID of Voxel
Note
Assumes a default color of black.

Definition at line 178 of file Context_primitive.cpp.

◆ getPatchCount()

size_t Context::getPatchCount ( bool  include_hidden_primitives = true) const

Get the total number of patch Primitives in the Context.

Parameters
[in]include_hidden_primitives[optional] If true, the number of hidden primitives is included in the count.

Definition at line 714 of file Context_primitive.cpp.

◆ getPrimitiveCount()

size_t Context::getPrimitiveCount ( bool  include_hidden_primitives = true) const

Get the total number of Primitives in the Context.

Parameters
[in]include_hidden_primitives[optional] If true, the number of hidden primitives is included in the count.

Definition at line 690 of file Context_primitive.cpp.

◆ getTriangleCount()

size_t Context::getTriangleCount ( bool  include_hidden_primitives = true) const

Get the total number of triangle Primitives in the Context.

Parameters
[in]include_hidden_primitives[optional] If true, the number of hidden primitives is included in the count.

Definition at line 704 of file Context_primitive.cpp.