Rasterfarm-SDK
Loading...
Searching...
No Matches
Physical::GeometricAttribute Class Reference

#include <physical.h>

Inheritance diagram for Physical::GeometricAttribute:
Physical::SurfaceAttributes

Public Types

enum  BoundingType : uint {
  NONE = 0 ,
  SPHERE ,
  SEGMENT ,
  SEGMENT_ARRAY ,
  PLANE ,
  DISK ,
  AA_BOX ,
  CAPSULE ,
  BOX ,
  POLYGON ,
  CONTOUR ,
  GEOMETRIC_HULL
}
 

Public Member Functions

 GeometricAttribute ()
 
 GeometricAttribute (BoundingType boundingType, float mass, float elasticityCoeff, float frictionCoeff, float dragCoeff, bool transformable, float faceWidth=0.0f)
 
- Public Member Functions inherited from Physical::SurfaceAttributes
 SurfaceAttributes ()
 
 SurfaceAttributes (float elasticityCoeff, float frictionCoeff, float faceWidth=0.0f)
 

Public Attributes

BoundingType boundingType
 
float mass
 
float dragCoeff
 
bool transformable
 
- Public Attributes inherited from Physical::SurfaceAttributes
float elasticityCoeff
 
float frictionCoeff
 
float width
 

Detailed Description

Describes some basic physical attributes of a Geometric object.

Member Enumeration Documentation

◆ BoundingType

The appropriate primative to use to test for collisions and drag calculations by the Scene. This eliminates the need for the Engine3D to perform additional runtime tests. Note that if and an object's Geometry is manipulated or transformed, the default BoundingType may need to change (eg. a scaled-sphere is now a capsule). Note that Scene3D::Physical will use this determine the cross-sectional area for drag.

The types below are ordered by the complexity of the collision test.

Enumerator
NONE 
SPHERE 
SEGMENT 
SEGMENT_ARRAY 
PLANE 
DISK 
AA_BOX 
CAPSULE 
BOX 
POLYGON 
CONTOUR 
GEOMETRIC_HULL 

Constructor & Destructor Documentation

◆ GeometricAttribute() [1/2]

Physical::GeometricAttribute::GeometricAttribute ( )

◆ GeometricAttribute() [2/2]

Physical::GeometricAttribute::GeometricAttribute ( BoundingType boundingType,
float mass,
float elasticityCoeff,
float frictionCoeff,
float dragCoeff,
bool transformable,
float faceWidth = 0.0f )

Member Data Documentation

◆ boundingType

BoundingType Physical::GeometricAttribute::boundingType

For very complex Geometries, the boundingType could be NONE but this would be rare and should be avoided.

◆ dragCoeff

float Physical::GeometricAttribute::dragCoeff

A coefficient drag. Due to complexity, this is on a per-object basis and not per object-surface. Examples can be found here: https://en.wikipedia.org/wiki/Drag_coefficient

◆ mass

float Physical::GeometricAttribute::mass

As in the physical-world, all objects have mass and this is key in determining how objects interact with each other. And with respect to gravity this value has no meaning(in theory).

◆ transformable

bool Physical::GeometricAttribute::transformable

A flag indicating if the object is modal or not.


The documentation for this class was generated from the following file: