Conscience Core
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
CscWorldPlace Class Reference

#include <CscWorldPlace.h>

Inheritance diagram for CscWorldPlace:
CscWorldElement

Public Member Functions

string getModelId () const
 
const string & getModelOwner () const
 
bool getUseConscienceCoordinateSystem () const
 
CscWorldPlaceclone ()
 
CscPoint3d getMinPositionInWorldCoordinates () const override
 
bool hasModelId (int modelId)
 
bool hasModelId (const string &modelId)
 
 CscWorldPlace (const string &placeModelId, const string &name, CscPoint3d *position, CscPoint3d *rotation, const string &placeOwner, const float mass, vector< CscWorldElementPart * > *parts=nullptr, vector< CscPoint3d * > *positions=nullptr, vector< CscPoint3d * > *normals=nullptr, vector< CscPolygon * > *polygons=nullptr, vector< const CscLocationTag * > *locationTags=nullptr, const float minX=0, const float minY=0, const float minZ=0, const float depth=0, const float height=0, const float width=0, const bool useConscienceCoordianteSystem=false)
 
CscPoint3dcalculatePositionFromGps (double lat, double lng)
 
- Public Member Functions inherited from CscWorldElement
 CscWorldElement (const CscWorldElementId &id, const string &name, CscPoint3d *positionIn, CscPoint3d *rotationEulerIn, CscPhysicsType physicsType=CscPhysicsType::BOUNDING_BOX, float mass=5.0, vector< CscWorldElementPart * > *parts=nullptr, vector< CscPoint3d * > *positions=nullptr, vector< CscPoint3d * > *normals=nullptr, vector< CscPolygon * > *polygons=nullptr, vector< const CscLocationTag * > *locationTags=nullptr, float minX=0, float minY=0, float minZ=0, float depth=0, float height=0, float width=0)
 
virtual ~CscWorldElement ()
 
const CscPoint3dgetPosition () const
 
void setPosition (float x, float y, float z)
 
const CscPoint3dgetRotationEulerAsPoint () const
 
void setRotationEuler (double x, double y, double z)
 
void setRotationQuaternion (double w, double x, double y, double z)
 
bool isIn3DArea (const CscArea3d *area) const
 
const string & getName () const
 
virtual CscWorldElementId getId () const
 
float getMass ()
 
virtual CscSize3d getDimensions () const
 
float * getVerticesArray () const
 
float * getPolygonsArray () const
 
int getVerticesCount () const
 
int getPolygonsCount () const
 
void repositionateToZeroOriginPositions ()
 
void repositionateToZeroOriginPolygons ()
 
vector< CscPoint3d * > * getPositions () const
 
vector< CscPolygon * > * getPolygons () const
 
vector< CscPolygon * > getPolygonsInWorldCoordinates () const
 
vector< CscPoint3d * > getYPlanSlicePoints (double sliceY, double precisionCm=5.0) const
 
vector< CscPoint3d * > * getNormals () const
 
const vector< CscWorldElementPart * > * getParts () const
 
vector< CscPoint3d * > * getReconstructedVerticesFromPolygons (const int stepInCm=10) const
 
CscPhysicsType getPhysicsType () const
 
const CscLocationTaggetLocationTagByName (const string &name) const
 
void forcePolygons (const vector< CscPolygon * > &newPolygons)
 
void addTag (const string &tag)
 
void removeTag (const string &tag)
 
bool hasTag (const string &tag) const
 
const double *const getRotationQuaternionArray () const
 
CscQuaternion getRotationQuaternion () const
 
CscRotation3dEuler getRotationEuler () const
 

Public Attributes

CscMotionType motion = MotionTypeNormal
 
- Public Attributes inherited from CscWorldElement
float depth = 0
 
float height = 0
 
float width = 0
 
float minX
 
float minY
 
float minZ
 
float mass = 1.0
 
float restitution = 0.3
 
float dampingLinear = 0.3
 
float dampingAngular = 0.3
 
float friction = 1.0
 
bool collideWithOthers = true
 
float certitude = 0.0
 

Static Public Attributes

static const CscPoint3dplaceDaeToCscEulerXYZ = new CscPoint3d(0.0,-M_PI,-M_PI_2)
 

Protected Member Functions

const CscPoint3dgetBaseRotation () const override
 

Additional Inherited Members

- Static Public Member Functions inherited from CscWorldElement
static CscWorldElementId nextId ()
 
- Protected Attributes inherited from CscWorldElement
const CscWorldElementId id
 
vector< const CscLocationTag * > * locationTags
 

Constructor & Destructor Documentation

◆ CscWorldPlace()

CscWorldPlace::CscWorldPlace ( const string &  placeModelId,
const string &  name,
CscPoint3d position,
CscPoint3d rotation,
const string &  placeOwner,
const float  mass,
vector< CscWorldElementPart * > *  parts = nullptr,
vector< CscPoint3d * > *  positions = nullptr,
vector< CscPoint3d * > *  normals = nullptr,
vector< CscPolygon * > *  polygons = nullptr,
vector< const CscLocationTag * > *  locationTags = nullptr,
const float  minX = 0,
const float  minY = 0,
const float  minZ = 0,
const float  depth = 0,
const float  height = 0,
const float  width = 0,
const bool  useConscienceCoordianteSystem = false 
)

Member Function Documentation

◆ calculatePositionFromGps()

CscPoint3d * CscWorldPlace::calculatePositionFromGps ( double  lat,
double  lng 
)
Exceptions
MissingGeolocationTagsExceptionif tags BR BL TR TL are missing

◆ clone()

CscWorldPlace * CscWorldPlace::clone ( )

◆ getBaseRotation()

const CscPoint3d & CscWorldPlace::getBaseRotation ( ) const
overrideprotectedvirtual
Returns
base rotation for this element type. Some element types have a base rotation (for instance places => CscWorldPlace::placeDaeToCscEulerXYZ)

Reimplemented from CscWorldElement.

◆ getMinPositionInWorldCoordinates()

CscPoint3d CscWorldPlace::getMinPositionInWorldCoordinates ( ) const
overridevirtual
Returns
min position of this element in Conscience world's coordinates

Reimplemented from CscWorldElement.

◆ getModelId()

string CscWorldPlace::getModelId ( ) const

◆ getModelOwner()

const string & CscWorldPlace::getModelOwner ( ) const

◆ getUseConscienceCoordinateSystem()

bool CscWorldPlace::getUseConscienceCoordinateSystem ( ) const

◆ hasModelId() [1/2]

bool CscWorldPlace::hasModelId ( const string &  modelId)

◆ hasModelId() [2/2]

bool CscWorldPlace::hasModelId ( int  modelId)

Member Data Documentation

◆ motion

CscMotionType CscWorldPlace::motion = MotionTypeNormal

◆ placeDaeToCscEulerXYZ

const CscPoint3d* CscWorldPlace::placeDaeToCscEulerXYZ = new CscPoint3d(0.0,-M_PI,-M_PI_2)
inlinestatic

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