Clarisse 3.6 SP10 SDK
3.6.0.0.10
|
Class representing a point cloud. More...
Classes | |
class | SampleLoader |
struct | SupportDeformedDescriptor |
Public Types | |
typedef CoreSharedPointer < SampleLoader > | SampleLoaderPtr |
Public Member Functions | |
GeometryPointCloud (const unsigned int &point_count=0) | |
GeometryPointCloud (const GeometryPointCloud &other, const bool &is_instance=false) | |
const Topology & | get_topology () const |
const Geometry & | get_geometry () const |
Topology & | get_topology () |
Geometry & | get_geometry () |
bool | is_compatible_with (const GeometryPointCloud &other) const |
Tell if the current point cloud is compatible with another one. | |
size_t | get_memory_size () const |
Get the memory size of the point cloud. | |
unsigned int | get_point_count () const |
Get the number of points. | |
void | get_sample (const unsigned int &point_index, GeometryPointSample &sample) const |
Get a geometry sample corresponding to a point. | |
bool | has_support () const |
Tell if the points have support information, i.e. if the points have been generated by sampling a geometry. | |
bool | has_positions () const |
Tell if points have positions. | |
bool | has_normals () const |
Tell if points have normals. | |
bool | has_velocities () const |
Tell if points have velocities. | |
bool | has_sampling () const |
Tell if positions are sampled over the time. | |
bool | is_animated () const |
Tell if the points are animated (with either velocities or sampling) | |
const GMathTimeSampling & | get_sampling () const |
Return the time sampling for positions. | |
bool | init (const unsigned int &point_count, const bool &has_positions, const bool &has_normals, const bool &has_velocities) |
Init the point cloud. | |
bool | init (const unsigned int &point_count, const GMathVec3f *positions=0, const GMathVec3f *normals=0, const GMathVec3f *velocities=0) |
Init the point cloud. | |
bool | init (const unsigned int &point_count, const GeometryDescriptor &support_geometry, const unsigned int *support_primitive_indices, const GMathVec2f *support_primitive_uv, const GMathVec3f *positions=0, const GMathVec3f *normals=0, const GMathVec3f *velocities=0) |
Init the point cloud. | |
bool | init (const unsigned int &point_count, const GeometryDescriptor &support_geometry, const GeometryPrimitiveSampleDescriptor *support_primitive_samples, const GMathVec3f *positions=0, const GMathVec3f *normals=0, const GMathVec3f *velocities=0) |
Init the point cloud. | |
bool | init (const unsigned int &point_count, const CoreArray< GeometryDescriptor > &support_geometries, const unsigned int *support_geometry_indices, const unsigned int *support_primitive_indices, const GMathVec2f *support_primitive_uv, const GMathVec3f *positions=0, const GMathVec3f *normals=0, const GMathVec3f *velocities=0) |
Init the point cloud. | |
bool | init_support (GeometryDescriptor geometry, const unsigned int *primitive_indices, const GMathVec2f *primitive_uv) |
Init the support information of points. | |
bool | init_support (GeometryDescriptor geometry, const GeometryPrimitiveSampleDescriptor *primitive_samples) |
Init the support information of points. | |
bool | init_support (const CoreArray< GeometryDescriptor > &geometries, const unsigned int *geometry_indices, const unsigned int *primitive_indices, const GMathVec2f *primitive_uv) |
Init the support information of points. | |
void | init_geometry (const bool &has_positions, const bool &has_normals, const bool &has_velocities) |
Init the geometry of the point cloud. | |
void | init_geometry (const GMathVec3f *positions, const GMathVec3f *normals, const GMathVec3f *velocities) |
Init the geometry of the point cloud. | |
void | init_geometry (const GMathVec3d *positions, const GMathVec3d *normals, const GMathVec3d *velocities) |
Init the geometry of the point cloud. | |
void | init_geometry (const GMathVec3f *positions, const GMathVec3f *normals, const GMathVec3f *velocities, const CoreArray< GeometryDescriptor > &geometries) |
Init the geometry of the point cloud with its support geometries information. | |
void | init_geometry (const GMathVec3d *positions, const GMathVec3d *normals, const GMathVec3d *velocities, const CoreArray< GeometryDescriptor > &geometries) |
Init the geometry of the point cloud with its support geometries information. | |
void | init_geometry (const GMathVec3f *positions, const GMathVec3f *normals, const GMathVec3f *velocities, const CoreArray< SupportDeformedDescriptor > &geometries) |
Init the geometry of the point cloud with its support geometries information. | |
void | init_geometry (const GMathVec3d *positions, const GMathVec3d *normals, const GMathVec3d *velocities, const CoreArray< SupportDeformedDescriptor > &geometries) |
Init the geometry of the point cloud with its support geometries information. | |
void | init_positions (const GMathVec3f &default_position) |
Init the positions of points. | |
void | init_positions (const GMathVec3f *positions) |
Init the positions of points. | |
void | init_positions (const GMathVec3d *positions) |
Init the positions of points. | |
void | init_normals (const GMathVec3f &default_normal) |
Init the normals of points. | |
void | init_normals (const GMathVec3f *normals, const bool &is_normalized=false) |
Init the normals of points. | |
void | init_normals (const GMathVec3d *normals, const bool &is_normalized=false) |
Init the normals of points. | |
void | init_velocities (const GMathVec3f &default_velocity) |
Init the velocities of points. | |
void | init_velocities (const GMathVec3f *velocities) |
Init the velocities of points. | |
void | init_velocities (const GMathVec3d *velocities) |
Init the velocities of points. | |
void | init_sampling (const GMathTimeSampling &time_sampling, SampleLoaderPtr loader) |
Init sampling of positions over the time. | |
GMathVec3f | get_position (const unsigned int &index) const |
Get the position of a point. | |
CoreBasicArray< GMathVec3f > | get_positions () const |
Get positions of points. | |
void | get_positions (CoreArray< GMathVec3f > &positions) const |
Get positions of points. | |
void | get_positions (GMathVec3f *positions) const |
| |
void | get_positions (GMathVec3f *positions, const unsigned int &begin, const unsigned int &end) const |
Get positions of a range of points. | |
GeometryPositionArray | get_positions_at (const double &time) const |
Get positions at a given time. | |
GMathVec3f | get_normal (const unsigned int &index) const |
Get the normal of a point. | |
void | get_normals (CoreArray< GMathVec3f > &normals) const |
Get normals of points. | |
void | get_normals (GMathVec3f *normals) const |
| |
void | get_normals (GMathVec3f *normals, const unsigned int &begin, const unsigned int &end) const |
Get normals of a range of points. | |
GMathVec3f | get_velocity (const unsigned int &index) const |
Get the velocity of a point. | |
CoreBasicArray< GMathVec3f > | get_velocities () const |
Get velocities of points. | |
void | get_velocities (CoreArray< GMathVec3f > &velocities) const |
Get velocities of points. | |
void | get_velocities (GMathVec3f *velocities) const |
| |
void | get_velocities (GMathVec3f *velocities, const unsigned int &begin, const unsigned int &end) const |
Get velocities of a range of points. | |
void | set_position (const GMathVec3f &position, const unsigned int &index) |
Set the position of a point. | |
void | set_positions (const CoreBasicArray< GMathVec3f > &positions) |
Set positions of all points. | |
void | set_positions (const GMathVec3f *positions) |
Set positions of all points. | |
void | set_positions (const CoreBasicArray< GMathVec3f > &positions, const unsigned int &begin, const unsigned int &end) |
Set positions of a range of points. | |
void | set_positions (const GMathVec3f *positions, const unsigned int &begin, const unsigned int &end) |
Set positions of a range of points. | |
void | set_normal (const GMathVec3f &normal, const unsigned int &index) |
Set the normal of a point. | |
void | set_normals (const GMathVec3f *normals) |
Set normals of all points. | |
void | set_normals (const GMathVec3f *normals, const unsigned int &begin, const unsigned int &end) |
Set normals of a range of points. | |
void | set_velocity (const GMathVec3f &velocity, const unsigned int &index) |
Set the velocity of a point. | |
void | set_velocities (const GMathVec3f *velocities) |
Set velocities of all points. | |
void | set_velocities (const GMathVec3f *velocities, const unsigned int &begin, const unsigned int &end) |
Set velocities of a range of points. | |
GeometryPointCloud & | operator= (const GeometryPointCloud &other) |
![]() | |
bool | is_kindof (const CoreClassInfo &cinfo) const |
bool | operator== (const CoreBaseType &obj) const |
Additional Inherited Members | |
![]() | |
static bool | ___class_destructor__ (void *instance, const bool &is_array) |
static const CoreClassInfo & | class_info () |
Class representing a point cloud.
This class is used internally by geometry objects to hold the vertex information. It can contain positions, normals, velocities and a support information that indicates if points have been generated by sampling a geometry.
struct GeometryPointCloud::SupportDeformedDescriptor |
Class Members | ||
---|---|---|
const GeometryObject * | deformed_geometry | |
GMathMatrix4x4d | matrix |
GMathVec3f GeometryPointCloud::get_normal | ( | const unsigned int & | index | ) | const |
Get the normal of a point.
[in] | index | the index of the point to get |
void GeometryPointCloud::get_normals | ( | CoreArray< GMathVec3f > & | normals | ) | const |
Get normals of points.
[out] | normals | array of normals for all points |
void GeometryPointCloud::get_normals | ( | GMathVec3f * | normals | ) | const |
void GeometryPointCloud::get_normals | ( | GMathVec3f * | normals, |
const unsigned int & | begin, | ||
const unsigned int & | end | ||
) | const |
Get normals of a range of points.
[out] | normals | array of normals for returned points |
[in] | begin | the index of the first normal to return |
[in] | end | the index following the last normal to return |
GMathVec3f GeometryPointCloud::get_position | ( | const unsigned int & | index | ) | const |
Get the position of a point.
[in] | index | the index of the point to get |
CoreBasicArray< GMathVec3f > GeometryPointCloud::get_positions | ( | ) | const |
Get positions of points.
void GeometryPointCloud::get_positions | ( | CoreArray< GMathVec3f > & | positions | ) | const |
Get positions of points.
[out] | positions | array of positions for all points |
void GeometryPointCloud::get_positions | ( | GMathVec3f * | positions | ) | const |
void GeometryPointCloud::get_positions | ( | GMathVec3f * | positions, |
const unsigned int & | begin, | ||
const unsigned int & | end | ||
) | const |
Get positions of a range of points.
[out] | positions | array of positions for returned points |
[in] | begin | the index of the first position to return |
[in] | end | the index following the last position to return |
GeometryPositionArray GeometryPointCloud::get_positions_at | ( | const double & | time | ) | const |
Get positions at a given time.
[in] | time | time at which the positions have to be evaluated |
void GeometryPointCloud::get_sample | ( | const unsigned int & | point_index, |
GeometryPointSample & | sample | ||
) | const |
Get a geometry sample corresponding to a point.
[in] | point_index | the index of the point |
[out] | sample | the sample on the geometry that is supporting the point |
CoreBasicArray< GMathVec3f > GeometryPointCloud::get_velocities | ( | ) | const |
Get velocities of points.
void GeometryPointCloud::get_velocities | ( | CoreArray< GMathVec3f > & | velocities | ) | const |
Get velocities of points.
[out] | velocities | array of velocities for all points |
void GeometryPointCloud::get_velocities | ( | GMathVec3f * | velocities | ) | const |
void GeometryPointCloud::get_velocities | ( | GMathVec3f * | velocities, |
const unsigned int & | begin, | ||
const unsigned int & | end | ||
) | const |
Get velocities of a range of points.
[out] | velocities | array of velocities for returned points |
[in] | begin | the index of the first velocity to return |
[in] | end | the index following the last velocity to return |
GMathVec3f GeometryPointCloud::get_velocity | ( | const unsigned int & | index | ) | const |
Get the velocity of a point.
[in] | index | the index of the point to get |
bool GeometryPointCloud::init | ( | const unsigned int & | point_count, |
const bool & | has_positions, | ||
const bool & | has_normals, | ||
const bool & | has_velocities | ||
) |
Init the point cloud.
[in] | point_count | the number of points wanted |
[in] | positions | tells whether the points have positions |
[in] | normals | tells whether the points have normals |
[in] | velocities | tells whether the points have velocities |
bool GeometryPointCloud::init | ( | const unsigned int & | point_count, |
const GMathVec3f * | positions = 0 , |
||
const GMathVec3f * | normals = 0 , |
||
const GMathVec3f * | velocities = 0 |
||
) |
Init the point cloud.
[in] | point_count | the number of points wanted |
[in] | positions | array of positions, one position per point |
[in] | normals | array of normals, one normal per point |
[in] | velocities | array of velocities, one velocity per point |
bool GeometryPointCloud::init | ( | const unsigned int & | point_count, |
const GeometryDescriptor & | support_geometry, | ||
const unsigned int * | support_primitive_indices, | ||
const GMathVec2f * | support_primitive_uv, | ||
const GMathVec3f * | positions = 0 , |
||
const GMathVec3f * | normals = 0 , |
||
const GMathVec3f * | velocities = 0 |
||
) |
Init the point cloud.
[in] | point_count | the number of points wanted |
[in] | support_geometry | the geometry on which the points have been generated |
[in] | support_primitive_indices | array of primitives on which points have been generated, one per point |
[in] | support_primitive_uv | array of primitive UV coordinates at which points have been generated, one per point |
[in] | positions | array of positions, one position per point |
[in] | normals | array of normals, one normal per point |
[in] | velocities | array of velocities, one velocity per point |
bool GeometryPointCloud::init | ( | const unsigned int & | point_count, |
const GeometryDescriptor & | support_geometry, | ||
const GeometryPrimitiveSampleDescriptor * | support_primitive_samples, | ||
const GMathVec3f * | positions = 0 , |
||
const GMathVec3f * | normals = 0 , |
||
const GMathVec3f * | velocities = 0 |
||
) |
Init the point cloud.
[in] | point_count | the number of points wanted |
[in] | support_geometry | the geometry on which the points have been generated |
[in] | support_primitive_samples | array of corresponding samples on the support geometry, one per point |
[in] | positions | array of positions, one position per point |
[in] | normals | array of normals, one normal per point |
[in] | velocities | array of velocities, one velocity per point |
bool GeometryPointCloud::init | ( | const unsigned int & | point_count, |
const CoreArray< GeometryDescriptor > & | support_geometries, | ||
const unsigned int * | support_geometry_indices, | ||
const unsigned int * | support_primitive_indices, | ||
const GMathVec2f * | support_primitive_uv, | ||
const GMathVec3f * | positions = 0 , |
||
const GMathVec3f * | normals = 0 , |
||
const GMathVec3f * | velocities = 0 |
||
) |
Init the point cloud.
[in] | point_count | the number of points wanted |
[in] | support_geometries | an array of support geometries |
[in] | support_geometry_indices | array of geometry indices on which the points have been generated, one per point |
[in] | support_primitive_indices | array of primitives on which points have been generated, one per point |
[in] | support_primitive_uv | array of primitive UV coordinates at which points have been generated, one per point |
[in] | positions | array of positions, one position per point |
[in] | normals | array of normals, one normal per point |
[in] | velocities | array of velocities, one velocity per point |
void GeometryPointCloud::init_geometry | ( | const bool & | has_positions, |
const bool & | has_normals, | ||
const bool & | has_velocities | ||
) |
Init the geometry of the point cloud.
[in] | has_positions | tell if points have positions |
[in] | has_normals | tell if points have normals |
[in] | has_velocities | tell if points have velocities |
void GeometryPointCloud::init_geometry | ( | const GMathVec3f * | positions, |
const GMathVec3f * | normals, | ||
const GMathVec3f * | velocities | ||
) |
Init the geometry of the point cloud.
[in] | positions | array of positions, one per point |
[in] | normals | array of normals, one per point |
[in] | velocities | array of velocities, one per point |
void GeometryPointCloud::init_geometry | ( | const GMathVec3d * | positions, |
const GMathVec3d * | normals, | ||
const GMathVec3d * | velocities | ||
) |
Init the geometry of the point cloud.
[in] | positions | array of positions, one per point |
[in] | normals | array of normals, one per point |
[in] | velocities | array of velocities, one per point |
void GeometryPointCloud::init_geometry | ( | const GMathVec3f * | positions, |
const GMathVec3f * | normals, | ||
const GMathVec3f * | velocities, | ||
const CoreArray< GeometryDescriptor > & | geometries | ||
) |
Init the geometry of the point cloud with its support geometries information.
[in] | positions | array of positions, one per point |
[in] | normals | array of normals, one per point |
[in] | velocities | array of velocities, one per point |
[in] | geometries | array of the support geometries used to generate the point cloud |
void GeometryPointCloud::init_geometry | ( | const GMathVec3d * | positions, |
const GMathVec3d * | normals, | ||
const GMathVec3d * | velocities, | ||
const CoreArray< GeometryDescriptor > & | geometries | ||
) |
Init the geometry of the point cloud with its support geometries information.
[in] | positions | array of positions, one per point |
[in] | normals | array of normals, one per point |
[in] | velocities | array of velocities, one per point |
[in] | geometries | array of the support geometries used to generate the point cloud |
void GeometryPointCloud::init_geometry | ( | const GMathVec3f * | positions, |
const GMathVec3f * | normals, | ||
const GMathVec3f * | velocities, | ||
const CoreArray< SupportDeformedDescriptor > & | geometries | ||
) |
Init the geometry of the point cloud with its support geometries information.
[in] | positions | array of positions, one per point |
[in] | normals | array of normals, one per point |
[in] | velocities | array of velocities, one per point |
[in] | geometries | array of the support geometries used to generate the point cloud |
void GeometryPointCloud::init_geometry | ( | const GMathVec3d * | positions, |
const GMathVec3d * | normals, | ||
const GMathVec3d * | velocities, | ||
const CoreArray< SupportDeformedDescriptor > & | geometries | ||
) |
Init the geometry of the point cloud with its support geometries information.
[in] | positions | array of positions, one per point |
[in] | normals | array of normals, one per point |
[in] | velocities | array of velocities, one per point |
[in] | geometries | array of the support geometries used to generate the point cloud |
void GeometryPointCloud::init_normals | ( | const GMathVec3f & | default_normal | ) |
Init the normals of points.
[in] | default_normal | the normal value to affect to all points |
void GeometryPointCloud::init_normals | ( | const GMathVec3f * | normals, |
const bool & | is_normalized = false |
||
) |
Init the normals of points.
[in] | normals | array of normals, one per point |
void GeometryPointCloud::init_normals | ( | const GMathVec3d * | normals, |
const bool & | is_normalized = false |
||
) |
Init the normals of points.
[in] | normals | array of normals, one per point |
void GeometryPointCloud::init_positions | ( | const GMathVec3f & | default_position | ) |
Init the positions of points.
[in] | default_position | the position value to affect to all points |
void GeometryPointCloud::init_positions | ( | const GMathVec3f * | positions | ) |
Init the positions of points.
[in] | positions | array of positions, one per point |
void GeometryPointCloud::init_positions | ( | const GMathVec3d * | positions | ) |
Init the positions of points.
[in] | positions | array of positions, one per point |
void GeometryPointCloud::init_sampling | ( | const GMathTimeSampling & | time_sampling, |
SampleLoaderPtr | loader | ||
) |
Init sampling of positions over the time.
[in] | time_sampling | the repartition of samples over the time |
[in] | loader | the loader that will be used to load the positions samples on demand |
bool GeometryPointCloud::init_support | ( | GeometryDescriptor | geometry, |
const unsigned int * | primitive_indices, | ||
const GMathVec2f * | primitive_uv | ||
) |
Init the support information of points.
[in] | geometry | the geometry on which the points have been generated |
[in] | primitive_indices | array of primitives on which points have been generated, one per point |
[in] | primitive_uv | array of primitive UV coordinates at which points have been generated, one per point |
bool GeometryPointCloud::init_support | ( | GeometryDescriptor | geometry, |
const GeometryPrimitiveSampleDescriptor * | primitive_samples | ||
) |
Init the support information of points.
[in] | geometry | the geometry on which the points have been generated |
[in] | primitive_samples | array of corresponding samples on the support geometry, one per point |
bool GeometryPointCloud::init_support | ( | const CoreArray< GeometryDescriptor > & | geometries, |
const unsigned int * | geometry_indices, | ||
const unsigned int * | primitive_indices, | ||
const GMathVec2f * | primitive_uv | ||
) |
Init the support information of points.
[in] | geometries | an array of support geometries |
[in] | geometry_indices | array of geometry indices on which the points have been generated, one per point |
[in] | primitive_indices | array of primitives on which points have been generated, one per point |
[in] | primitive_uv | array of primitive UV coordinates at which points have been generated, one per point |
void GeometryPointCloud::init_velocities | ( | const GMathVec3f & | default_velocity | ) |
Init the velocities of points.
[in] | default_velocity | the velocity value to affect to all points |
void GeometryPointCloud::init_velocities | ( | const GMathVec3f * | velocities | ) |
Init the velocities of points.
[in] | velocities | array of velocities, one per point |
void GeometryPointCloud::init_velocities | ( | const GMathVec3d * | velocities | ) |
Init the velocities of points.
[in] | velocities | array of velocities, one per point |
|
inline |
Tell if the current point cloud is compatible with another one.
[in] | other | the point cloud to test |
void GeometryPointCloud::set_normal | ( | const GMathVec3f & | normal, |
const unsigned int & | index | ||
) |
Set the normal of a point.
[in] | normal | the new normal value |
[in] | index | the index of the point |
void GeometryPointCloud::set_normals | ( | const GMathVec3f * | normals | ) |
Set normals of all points.
[in] | normals | the array of new normal values, one per point |
void GeometryPointCloud::set_normals | ( | const GMathVec3f * | normals, |
const unsigned int & | begin, | ||
const unsigned int & | end | ||
) |
Set normals of a range of points.
[in] | normals | the array of new normal values, one per point in the range |
[in] | begin | the index of the first normal to set |
[in] | end | the index following the last normal to set |
void GeometryPointCloud::set_position | ( | const GMathVec3f & | position, |
const unsigned int & | index | ||
) |
Set the position of a point.
[in] | position | the new position value |
[in] | index | the index of the point |
void GeometryPointCloud::set_positions | ( | const CoreBasicArray< GMathVec3f > & | positions | ) |
Set positions of all points.
[in] | positions | the array of new position values, one per point |
void GeometryPointCloud::set_positions | ( | const GMathVec3f * | positions | ) |
Set positions of all points.
[in] | positions | the array of new position values, one per point |
void GeometryPointCloud::set_positions | ( | const CoreBasicArray< GMathVec3f > & | positions, |
const unsigned int & | begin, | ||
const unsigned int & | end | ||
) |
Set positions of a range of points.
[in] | positions | the array of new position values, one per point in the range |
[in] | begin | the index of the first position to set |
[in] | end | the index following the last position to set |
void GeometryPointCloud::set_positions | ( | const GMathVec3f * | positions, |
const unsigned int & | begin, | ||
const unsigned int & | end | ||
) |
Set positions of a range of points.
[in] | positions | the array of new position values, one per point in the range |
[in] | begin | the index of the first position to set |
[in] | end | the index following the last position to set |
void GeometryPointCloud::set_velocities | ( | const GMathVec3f * | velocities | ) |
Set velocities of all points.
[in] | velocities | the array of new velocity values, one per point |
void GeometryPointCloud::set_velocities | ( | const GMathVec3f * | velocities, |
const unsigned int & | begin, | ||
const unsigned int & | end | ||
) |
Set velocities of a range of points.
[in] | velocities | the array of new velocity values, one per point in the range |
[in] | begin | the index of the first velocity to set |
[in] | end | the index following the last velocity to set |
void GeometryPointCloud::set_velocity | ( | const GMathVec3f & | velocity, |
const unsigned int & | index | ||
) |
Set the velocity of a point.
[in] | velocity | the new velocity value |
[in] | index | the index of the point |