Voxelyze
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
CVX_MaterialLink Class Reference

Defines the homogenous material properties of a link connecting two voxels. More...

#include <VX_MaterialLink.h>

Inheritance diagram for CVX_MaterialLink:
CVX_MaterialVoxel CVX_Material

List of all members.

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_MaterialLinkoperator= (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_MaterialVoxelvox1Mat
 Constituent material 1 from one voxel.
CVX_MaterialVoxelvox2Mat
 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

Detailed Description

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.


Constructor & Destructor Documentation

Creates a link material from the two specified voxel materials. The order is unimportant.

Parameters:
[in]mat1voxel material on one side of the link.
[in]mat2voxel material on the other side of the link.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations Enumerator Friends