Clarisse 5.0 SP8 SDK
5.0.5.8.0
|
This class defines a geometric sample on a geometry. More...
Public Member Functions | |
void | clear () |
Set all positions, normals and derivatives to zero. | |
void | init_surface (const GMathVec3d &position, const GMathVec3d &dpdu, const GMathVec3d &dpdv, const GMathVec3d &d2pduu, const GMathVec3d &d2pduv, const GMathVec3d &d2pdvv) |
Init the sample with a position and derivatives. | |
void | init_surface (const GMathVec3d &position, const GMathVec3d &dpdu, const GMathVec3d &dpdv, const GMathVec3d &dndu=GMathVec3d(0.0), const GMathVec3d &dndv=GMathVec3d(0.0)) |
Init the sample with geometric positions and derivatives. | |
void | init_surface_point (const GMathVec3d &position, const GMathVec3d &dpdu, const GMathVec3d &dpdv, const GMathVec3d &normal, const GMathVec3d &dndu, const GMathVec3d &dndv) |
Init the sample with geometric positions and derivatives. | |
void | set_smoothing (const GMathVec3d &position, const GMathVec3d &normal, const GMathVec3d &dndu=GMathVec3d(0.0), const GMathVec3d &dndv=GMathVec3d(0.0)) |
Set the sample with smoothed positions and derivatives. | |
void | set_smoothing (const GMathVec3d &position, const GMathVec3d &normal, const GMathVec3d &d2pduu, const GMathVec3d &d2pduv, const GMathVec3d &d2pdvv) |
Set the sample with smoothed positions and derivatives. | |
void | init_point (const GMathVec3d &geometric_position) |
Init the sample with only a position. | |
void | init_point (const GMathVec3d &geometric_position, const GMathVec3d &geometric_normal, const bool &normalized=false) |
Init the sample with a position and a normal. | |
void | init_point (const GMathVec3d &geometric_position, const GMathVec3d &geometric_normal, const GMathVec3d &smoothed_position, const GMathVec3d &smoothed_normal, const bool &normalized=false) |
Init the sample with geometric and smoothed positions and normals. | |
void | set_sub_differentials (const GMathVec3d &dpdu, const GMathVec3d &dpdv) |
Set the partial derivatives of the position at the sub primitive level. | |
void | set_position (const GMathVec3d &v) |
Set the geometric and smoothed positions at the same time. | |
void | set_geometric_position (const GMathVec3d &v) |
Set the geometric position. | |
void | set_smoothed_position (const GMathVec3d &v) |
Set the smoothed position. | |
void | set_geometric_position_dt (const GMathVec3d &v) |
Set the geometric position at (t + dt) | |
void | set_shading_normal (const GMathVec3d &v) |
Set a shading normal which can be different from the geometric and smoothed normals. | |
void | normalize () |
Normalize the normals. | |
void | transform (const GMathMatrix4x4d &xform, const GMathMatrix4x4d *xform_dt=0) |
Transform the current sample by a matrix. | |
void | transform (const GeometrySample &sample, const GMathMatrix4x4d &xform, const GMathMatrix4x4d *xform_dt=0) |
Transform a sample by a matrix. | |
void | init_surface (const GMathVec3f &position, const GMathVec3f &dpdu, const GMathVec3f &dpdv, const GMathVec3f &d2puu, const GMathVec3f &d2puv, const GMathVec3f &d2pvv) |
| |
void | init_surface (const GMathVec3f &position, const GMathVec3f &dpdu, const GMathVec3f &dpdv, const GMathVec3f &dndu=GMathVec3f(0.0), const GMathVec3f &dndv=GMathVec3f(0.0)) |
Init the sample with geometric positions and derivatives. | |
void | set_smoothing (const GMathVec3f &position, const GMathVec3f &normal, const GMathVec3f &dndu=GMathVec3f(0.0), const GMathVec3f &dndv=GMathVec3f(0.0)) |
| |
void | set_smoothing (const GMathVec3f &position, const GMathVec3f &normal, const GMathVec3f &d2pduu, const GMathVec3f &d2pduv, const GMathVec3f &d2pdvv) |
| |
void | init_point (const GMathVec3f &geometric_position) |
Init the sample with only a position. | |
void | init_point (const GMathVec3f &geometric_position, const GMathVec3f &geometric_normal, const bool &normalized=false) |
Init the sample with a position and a normal. | |
void | init_point (const GMathVec3f &geometric_position, const GMathVec3f &geometric_normal, const GMathVec3f &smoothed_position, const GMathVec3f &smoothed_normal, const bool &normalized=false) |
Init the sample with geometric and smoothed positions and normals. | |
void | set_sub_differentials (const GMathVec3f &dpdu, const GMathVec3f &dpdv) |
Set the partial derivatives of the position at the sub primitive level. | |
void | set_position (const GMathVec3f &v) |
Set the geometric and smoothed positions at the same time. | |
void | set_geometric_position (const GMathVec3f &v) |
Set the geometric position. | |
void | set_smoothed_position (const GMathVec3f &v) |
Set the smoothed position. | |
void | set_geometric_position_dt (const GMathVec3f &v) |
Set the geometric position at (t + dt) | |
void | set_shading_normal (const GMathVec3f &v) |
Set a shading normal which can be different from the geometric and smoothed normals. | |
const GMathVec3d & | get_geometric_position () const |
Get the geometric position. | |
const GMathVec3d & | get_geometric_position_dt () const |
Get the geometric position at (t + dt) | |
const GMathVec3d & | get_geometric_dpdu () const |
Get the geometric position partial derivative for U parameter of the primitive. | |
const GMathVec3d & | get_geometric_dpdv () const |
Get the geometric position partial derivative for V parameter of the primitive. | |
const GMathVec3d & | get_geometric_dndu () const |
Get the geometric normal partial derivative for V parameter of the primitive. | |
const GMathVec3d & | get_geometric_dndv () const |
Get the geometric normal partial derivative for V parameter of the primitive. | |
const GMathVec3d & | get_geometric_sub_dpdu () const |
Get the geometric position partial derivative for U parameter of the sub primitive. | |
const GMathVec3d & | get_geometric_sub_dpdv () const |
Get the geometric position partial derivative for V parameter of the sub primitive. | |
const GMathVec3d & | get_geometric_normal () const |
Get the geometric normal. | |
const GMathVec3d & | get_smoothed_position () const |
Get the smoothed position. | |
const GMathVec3d & | get_smoothed_dpdu () const |
Get the smoothed position partial derivative for U parameter of the primitive. | |
const GMathVec3d & | get_smoothed_dpdv () const |
Get the smoothed position partial derivative for V parameter of the primitive. | |
const GMathVec3d & | get_smoothed_dndu () const |
Get the smoothed position partial derivative for U parameter of the primitive. | |
const GMathVec3d & | get_smoothed_dndv () const |
Get the smoothed position partial derivative for V parameter of the primitive. | |
const GMathVec3d & | get_smoothed_normal () const |
Get the smoothed normal. | |
const GMathVec3d & | get_shading_normal () const |
Get the smoothed normal. | |
bool | has_differentials () const |
Tell if the sample is defining derivatives. | |
bool | has_sub_differentials () const |
Tell if the sample is defining sub derivatives. | |
bool | has_motion () const |
Tell if the sample has a motion (different position at t + dt) | |
bool | has_normal () const |
Tell if the sample is defining a normal. | |
bool | is_normalized () const |
Tell if the normals are normalized. | |
void | compute_position_differentials (const GMathVec3d &normal, GMathVec3d &dpdu, GMathVec3d &dpdv) const |
Compute dpdu/dpdv from a given normal. | |
![]() | |
bool | is_kindof (const CoreClassInfo &cinfo) const |
Additional Inherited Members | |
![]() | |
static const CoreClassInfo & | class_info () |
Get the type descriptor of this instance. | |
This class defines a geometric sample on a geometry.
The surface of a geometry can have two representations, a geometric one (which is often flat) and a smoothed one. The sample contains positions, normals, derivatives for both of these representations.
void GeometrySample::init_point | ( | const GMathVec3d & | geometric_position | ) |
Init the sample with only a position.
The sample is considered as a single point with no surface. It has no derivative.
[in] | geometric_position | the geometric position of the point |
void GeometrySample::init_point | ( | const GMathVec3d & | geometric_position, |
const GMathVec3d & | geometric_normal, | ||
const bool & | normalized = false |
||
) |
Init the sample with a position and a normal.
The sample is considered as a single point with no surface. It has no derivative.
[in] | geometric_position | the geometric position of the point |
[in] | geometric_normal | the geometric normal of the point |
[in] | normalized | indicate if the normal is already normalized |
void GeometrySample::init_point | ( | const GMathVec3d & | geometric_position, |
const GMathVec3d & | geometric_normal, | ||
const GMathVec3d & | smoothed_position, | ||
const GMathVec3d & | smoothed_normal, | ||
const bool & | normalized = false |
||
) |
Init the sample with geometric and smoothed positions and normals.
The sample is considered as a single point with no surface. It has no derivative.
[in] | geometric_position | the geometric position of the point |
[in] | geometric_normal | the geometric normal of the point |
[in] | smoothed_position | the smoothed position of the point |
[in] | smoothed_normal | the smoothed normal of the point |
[in] | normalized | indicate if the normals are already normalized |
|
inline |
Init the sample with only a position.
The sample is considered as a single point with no surface. It has no derivative.
[in] | geometric_position | the geometric position of the point |
|
inline |
Init the sample with a position and a normal.
The sample is considered as a single point with no surface. It has no derivative.
[in] | geometric_position | the geometric position of the point |
[in] | geometric_normal | the geometric normal of the point |
[in] | normalized | indicate if the normal is already normalized |
|
inline |
Init the sample with geometric and smoothed positions and normals.
The sample is considered as a single point with no surface. It has no derivative.
[in] | geometric_position | the geometric position of the point |
[in] | geometric_normal | the geometric normal of the point |
[in] | smoothed_position | the smoothed position of the point |
[in] | smoothed_normal | the smoothed normal of the point |
[in] | normalized | indicate if the normals are already normalized |
void GeometrySample::init_surface | ( | const GMathVec3d & | position, |
const GMathVec3d & | dpdu, | ||
const GMathVec3d & | dpdv, | ||
const GMathVec3d & | d2pduu, | ||
const GMathVec3d & | d2pduv, | ||
const GMathVec3d & | d2pdvv | ||
) |
Init the sample with a position and derivatives.
The sample is considered as lying on a surface which has the same geometric and smoothed representations. The normal of the surface is computed from the derivatives.The normal derivatives are compute from the second derivative of u and v using the Weingarten equations
[in] | position | the position on the surface |
[in] | dpdu | the partial derivative of the position for the U paramater of the primitive |
[in] | dpdv | the partial derivative of the position for the V paramater of the primitive |
[in] | d2pduu | the second partial derivative of the position for the U then U paramater of the primitive |
[in] | d2pduv | the second partial derivative of the position for the U then V paramater of the primitive |
[in] | d2pdvv | the second partial derivative of the position for the V then V paramater of the primitive |
void GeometrySample::init_surface | ( | const GMathVec3d & | position, |
const GMathVec3d & | dpdu, | ||
const GMathVec3d & | dpdv, | ||
const GMathVec3d & | dndu = GMathVec3d(0.0) , |
||
const GMathVec3d & | dndv = GMathVec3d(0.0) |
||
) |
Init the sample with geometric positions and derivatives.
The sample is considered as lying on a surface which has different geometric and smoothed representations. The geometric normal of the surface is computed from the geometric derivatives. The smoothed derivatives are computed from the smoothed normal and geometric derivatives.
[in] | position | the geometric position on the surface |
[in] | dpdu | the geometric partial derivative of the position for the U paramater of the primitive |
[in] | dpdv | the geometric partial derivative of the position for the V paramater of the primitive |
[in] | dndu | the geometric partial derivative of the normal for the U paramater of the primitive |
[in] | dndv | the geometric partial derivative of the normal for the V paramater of the primitive |
|
inline |
|
inline |
Init the sample with geometric positions and derivatives.
The sample is considered as lying on a surface which has different geometric and smoothed representations. The geometric normal of the surface is computed from the geometric derivatives. The smoothed derivatives are computed from the smoothed normal and geometric derivatives.
[in] | position | the geometric position on the surface |
[in] | dpdu | the geometric partial derivative of the position for the U paramater of the primitive |
[in] | dpdv | the geometric partial derivative of the position for the V paramater of the primitive |
[in] | dndu | the geometric partial derivative of the normal for the U paramater of the primitive |
[in] | dndv | the geometric partial derivative of the normal for the V paramater of the primitive |
void GeometrySample::init_surface_point | ( | const GMathVec3d & | position, |
const GMathVec3d & | dpdu, | ||
const GMathVec3d & | dpdv, | ||
const GMathVec3d & | normal, | ||
const GMathVec3d & | dndu, | ||
const GMathVec3d & | dndv | ||
) |
Init the sample with geometric positions and derivatives.
The sample is considered as lying on a surface which has different geometric and smoothed representations. The geometric normal of the surface is computed from the geometric derivatives. The smoothed derivatives are computed from the smoothed normal and geometric derivatives.
[in] | position | the geometric position on the surface |
[in] | dpdu | the geometric partial derivative of the position for the U paramater of the primitive |
[in] | dpdv | the geometric partial derivative of the position for the V paramater of the primitive |
[in] | normal | the geometric normal on the surface |
[in] | dndu | the geometric partial derivative of the normal for the U paramater of the primitive |
[in] | dndv | the geometric partial derivative of the normal for the V paramater of the primitive |
void GeometrySample::set_geometric_position | ( | const GMathVec3d & | v | ) |
Set the geometric position.
[in] | v | the geometric position |
|
inline |
Set the geometric position.
[in] | v | the geometric position |
void GeometrySample::set_geometric_position_dt | ( | const GMathVec3d & | v | ) |
Set the geometric position at (t + dt)
[in] | v | the geometric position |
|
inline |
Set the geometric position at (t + dt)
[in] | v | the geometric position |
void GeometrySample::set_position | ( | const GMathVec3d & | v | ) |
Set the geometric and smoothed positions at the same time.
[in] | v | the position |
|
inline |
Set the geometric and smoothed positions at the same time.
[in] | v | the position |
void GeometrySample::set_shading_normal | ( | const GMathVec3d & | v | ) |
Set a shading normal which can be different from the geometric and smoothed normals.
[in] | v | the shading normal |
|
inline |
Set a shading normal which can be different from the geometric and smoothed normals.
[in] | v | the shading normal |
void GeometrySample::set_smoothed_position | ( | const GMathVec3d & | v | ) |
Set the smoothed position.
[in] | v | the smoothed position |
|
inline |
Set the smoothed position.
[in] | v | the smoothed position |
void GeometrySample::set_smoothing | ( | const GMathVec3d & | position, |
const GMathVec3d & | normal, | ||
const GMathVec3d & | dndu = GMathVec3d(0.0) , |
||
const GMathVec3d & | dndv = GMathVec3d(0.0) |
||
) |
Set the sample with smoothed positions and derivatives.
The sample is considered as lying on a surface which has different geometric and smoothed representations. The geometric normal of the surface is computed from the geometric derivatives. The smoothed derivatives are computed from the smoothed normal and geometric derivatives.
[in] | position | the smoothed position on the surface |
[in] | dpdu | the smoothed partial derivative of the position for the U paramater of the primitive |
[in] | dpdv | the smoothed partial derivative of the position for the V paramater of the primitive |
[in] | dndu | the smoothed partial derivative of the normal for the U paramater of the primitive |
[in] | dndv | the smoothed partial derivative of the normal for the V paramater of the primitive |
void GeometrySample::set_smoothing | ( | const GMathVec3d & | position, |
const GMathVec3d & | normal, | ||
const GMathVec3d & | d2pduu, | ||
const GMathVec3d & | d2pduv, | ||
const GMathVec3d & | d2pdvv | ||
) |
Set the sample with smoothed positions and derivatives.
The sample is considered as lying on a surface which has different geometric and smoothed representations. The geometric normal of the surface is computed from the geometric derivatives. The smoothed derivatives are computed from the smoothed normal and geometric derivatives.
[in] | position | the smoothed position on the surface |
[in] | dpdu | the smoothed partial derivative of the position for the U paramater of the primitive |
[in] | dpdv | the smoothed partial derivative of the position for the V paramater of the primitive |
[in] | d2pduu | used to compute the smoothed partial derivative of the normal |
[in] | d2pduv | used to compute the smoothed partial derivative of the normal |
[in] | d2pdvv | used to compute the smoothed partial derivative of the normal |
|
inline |
|
inline |
void GeometrySample::set_sub_differentials | ( | const GMathVec3d & | dpdu, |
const GMathVec3d & | dpdv | ||
) |
Set the partial derivatives of the position at the sub primitive level.
[in] | dpdu | the geometric partial derivative of the position for the U paramater of the sub primitive |
[in] | dpdv | the geometric partial derivative of the position for the V paramater of the sub primitive |
|
inline |
Set the partial derivatives of the position at the sub primitive level.
[in] | dpdu | the geometric partial derivative of the position for the U paramater of the sub primitive |
[in] | dpdv | the geometric partial derivative of the position for the V paramater of the sub primitive |
void GeometrySample::transform | ( | const GMathMatrix4x4d & | xform, |
const GMathMatrix4x4d * | xform_dt = 0 |
||
) |
Transform the current sample by a matrix.
[in] | xform | the transformation matrix |
[in] | xform_dt | the transformation matrix at (t + dt) |
void GeometrySample::transform | ( | const GeometrySample & | sample, |
const GMathMatrix4x4d & | xform, | ||
const GMathMatrix4x4d * | xform_dt = 0 |
||
) |
Transform a sample by a matrix.
[in] | sample | the sample to transform |
[in] | xform | the transformation matrix |
[in] | xform_dt | the transformation matrix at (t + dt) |