Voxelyze
|
Defines the homogenous material properties of a link connecting two voxels. More...
#include <VX_MaterialLink.h>
Public Member Functions | |
CVX_MaterialLink (CVX_MaterialVoxel *mat1, CVX_MaterialVoxel *mat2) | |
Creates a link material from the two specified voxel materials. The order is unimportant. | |
CVX_MaterialLink (const CVX_MaterialLink &VIn) | |
Copy constructor. | |
virtual CVX_MaterialLink & | operator= (const CVX_MaterialLink &VIn) |
Equals operator. | |
Protected Member Functions | |
virtual bool | updateAll () |
Updates and recalculates eveything possible (used by inherited classed when material properties have changed) | |
virtual bool | updateDerived () |
Updates all the derived quantities cached as member variables for this and derived classes. (Especially if density, size or elastic modulus changes.) | |
Protected Attributes | |
CVX_MaterialVoxel * | vox1Mat |
Constituent material 1 from one voxel. | |
CVX_MaterialVoxel * | vox2Mat |
Constituent material 2 from the other voxel. | |
float | _a1 |
Cached a1 beam constant. | |
float | _a2 |
Cached a2 beam constant. | |
float | _b1 |
Cached b1 beam constant. | |
float | _b2 |
Cached b2 beam constant. | |
float | _b3 |
Cached b3 beam constant. | |
float | _sqA1 |
Cached sqrt(a1) constant for damping calculations. | |
float | _sqA2xIp |
Cached sqrt(a2*L*L/6) constant for damping calculations. | |
float | _sqB1 |
Cached sqrt(b1) constant for damping calculations. | |
float | _sqB2xFMp |
Cached sqrt(b2*L/2) constant for damping calculations. | |
float | _sqB3xIp |
Cached sqrt(b3*L*L/6) constant for damping calculations. | |
Friends | |
class | CVoxelyze |
class | CVX_Link |
Defines the homogenous material properties of a link connecting two voxels.
The constructor takes the two voxel materials and calculates the "best" material properties of a third material that captures the physical behavior. Beam constants are precomputed to quick access during simulation.
If the two input voxel materials are identical then this material is applied and beam constants are precomputed.
If the materials are different a third material is carefully crafted from the two and beam constants precomputed.
CVX_MaterialLink::CVX_MaterialLink | ( | CVX_MaterialVoxel * | mat1, |
CVX_MaterialVoxel * | mat2 | ||
) |
Creates a link material from the two specified voxel materials. The order is unimportant.
[in] | mat1 | voxel material on one side of the link. |
[in] | mat2 | voxel material on the other side of the link. |