Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
GeometryPointProperty Class Reference

Class that associates values of a property to vertex IDs. More...

Inheritance diagram for GeometryPointProperty:
GeometryProperty CoreBaseObject CoreBaseType

Public Member Functions

 GeometryPointProperty (const CoreString &name="", const GMathTimeSampling &time_sampling=GMathTimeSampling(0.0), const ResourceProperty::Type &value_type=ResourceProperty::TYPE_COUNT, const unsigned int &value_count=0, const unsigned int &value_extent=0, const unsigned int &index_count=0)
 Constructor.
 
bool has_indices () const
 
void init_indices (const CoreBasicArray< unsigned int > &indices)
 Set the indices that are used to access the values: allows to have a remapping of the stored values.
 
void remove_indices ()
 Remove the indices used to access to the values: the values will be accessed directly by index.
 
bool init (const unsigned int &sample_index, ResourceProperty *data)
 Set the data for a given time sample.
 
void compute_hash_key ()
 
GeometryPointPropertyget_copy () const
 
const Core128BitHashKeyget_hash_key () const
 
size_t get_serial_size () const
 
bool serialize (CoreSerial &serial) const
 
bool deserialize (CoreSerial &serial)
 
virtual size_t get_memory_size () const override
 
const ResourcePropertyget_values_property (const unsigned int &sample_index) const
 
const CoreBasicArray< unsigned
int > & 
get_indices () const
 
- Public Member Functions inherited from GeometryProperty
 GeometryProperty (const CoreString &name, const GMathTimeSampling &time_sampling=GMathTimeSampling(0.0), const ResourceProperty::Type &value_type=ResourceProperty::TYPE_COUNT, const unsigned int &value_count=0, const unsigned int &value_extent=0, const unsigned int &index_count=0)
 Constructor.
 
void set_deferred_loading (LoadData load_data_cb, LoadDataInfo *load_data_cb_info)
 Enabled deferred loading of the property data by specifying a loading callback and its arguments.
 
const CoreStringget_name () const
 Get the name of the property.
 
const GMathTimeSamplingget_time_sampling () const
 Get the time sampling of the property.
 
virtual const
ResourceProperty::Type
get_value_type () const
 
virtual const unsigned int & get_value_count () const
 
virtual const unsigned int & get_value_extent () const
 
virtual const unsigned int & get_index_count () const
 
bool is_sampled () const
 Tell whether the property is sampled over the time or not.
 
CORE_FORCE_INLINE void load_data (const unsigned int &sample_index) const
 Forces the property to load its data if deferred data loading is enabled.
 
CORE_FORCE_INLINE unsigned int evaluate (const CtxEval &eval_ctx, const GeometryFragment &fragment, const unsigned int &sample_index, long long *values, long long *values_du, long long *values_dv, long long *values_dw, const unsigned int &value_count) const
 Evaluate the property and its derivatives as a natural number.
 
CORE_FORCE_INLINE unsigned int evaluate (const CtxEval &eval_ctx, const GeometryFragment &fragment, const unsigned int &sample_index, double *values, double *values_du, double *values_dv, double *values_dw, const unsigned int &value_count) const
 Evaluate the property and its derivatives as a real number.
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
CoreString get_class_info_name () const
 
const unsigned long & get_class_info_id () const
 
virtual bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 

Additional Inherited Members

- Public Types inherited from GeometryProperty
typedef void(* LoadData )(const unsigned int &sample_index, LoadDataInfo *)
 Callback that is given to the method set_deferred_loading in order to enable deferred loading of the property data.
 
typedef unsigned int(* EvaluateNaturalCallback )(const GeometryProperty &, const CtxEval &, const GeometryFragment &, const unsigned int &, long long *, long long *, long long *, long long *, const unsigned int &)
 Callback that must be implemented to define how the property must be evaluated for natural numbers.
 
typedef unsigned int(* EvaluateRealCallback )(const GeometryProperty &, const CtxEval &, const GeometryFragment &, const unsigned int &, double *, double *, double *, double *, const unsigned int &)
 Callback that must be implemented to define how the property must be evaluated for real numbers.
 
- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 
- Protected Member Functions inherited from GeometryProperty
void set_evaluate_callbacks (EvaluateNaturalCallback evaluate_natural_callback, EvaluateRealCallback evaluate_real_callback)
 Set the evaluation callbacks to use.
 
void set_time_sampling (const GMathTimeSampling &time_sampling)
 Set the time samplign of the property.
 
void set_name (const CoreString &name)
 Set the name of the property.
 
- Protected Attributes inherited from GeometryProperty
ResourceProperty::Type m_value_type
 
unsigned int m_value_count
 
unsigned int m_value_extent
 
unsigned int m_index_count
 

Detailed Description

Class that associates values of a property to vertex IDs.

The evaluation of the property is using the vertex_id attribute of the given fragment.

Constructor & Destructor Documentation

GeometryPointProperty::GeometryPointProperty ( const CoreString name = "",
const GMathTimeSampling time_sampling = GMathTimeSampling(0.0),
const ResourceProperty::Type value_type = ResourceProperty::TYPE_COUNT,
const unsigned int &  value_count = 0,
const unsigned int &  value_extent = 0,
const unsigned int &  index_count = 0 
)

Constructor.

Parameters
namename of the property
time_samplingthe sampling of values over the time
value_typethe type of each value
value_countthe number of values
value_extentthe extent of each value (i.e. 3 for a 3D vector)
index_countthe number of indices used to remap the values (can be 0)

Member Function Documentation

bool GeometryPointProperty::init ( const unsigned int &  sample_index,
ResourceProperty data 
)

Set the data for a given time sample.

Parameters
sample_indexthe index of the time sample
datathe data to associate to the time sample
Returns
true if the data corresponds to the description of the property (value type, count...)
void GeometryPointProperty::init_indices ( const CoreBasicArray< unsigned int > &  indices)
inline

Set the indices that are used to access the values: allows to have a remapping of the stored values.

Parameters
indicesthe array of indices
Note
Giving an empty array here will disable the remapping and the values will be accessed directly by index