14#ifndef MOMENTUM_GRANULARBODY_H
15#define MOMENTUM_GRANULARBODY_H
17#include "momentum_namespace.h"
18#include "momentum_export.h"
23#include "EulerAngles.h"
25#include <agx/Physics/GranularBodyEntity.h>
133#ifndef AGX_MOMENTUM_ANALYSIS_API
346 bool is(agx::Physics::GranularBodyPtr granularBody)
const;
348 agx::Physics::GranularBodyPtr
ptr()
const;
352 std::string getMaterialUuidString()
const;
357 agx::Physics::GranularBodyPtr m_granularBodyPtr;
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
Definition: EulerAngles.h:64
A GranularBody class, representing a 6DOF spherical object that interacts with the environment trough...
Definition: GranularBody.h:36
void setAngularVelocity(const Vec3 &angularVelocity)
Set the world angular velocity of the GranularBody.
void addTorque(double tx, double ty, double tz)
Adds the torque, given in world coordinate frame, that will be affecting this GranularBody in the nex...
Vec4 getColor() const
Get the color that will be used during rendering of the GranularBody.
void setMass(double mass)
Explicitly set the mass of the GranularBody.
void setTorque(const Vec3 &torque)
Explicitly set the torque, given in world coordinate frame, that will be affecting this GranularBody ...
void setVelocity(const Vec3 &velocity)
Quat getRotation() const
Returns the current world orientation of the GranularBody.
GranularBody()
Null-constructor.
unsigned int getId() const
Gets the unique identifier id for the GranularBody.
void setRadius(double radius)
Explicitly set the radius of the GranularBody.
void setAngularVelocity(double ax, double ay, double az)
Set the world angular velocity of the GranularBody.
void destroy()
Tag the GranularBody for destruction at the end of the timestep.
void addForce(const Vec3 &force)
Adds the force, given in world coordinate frame, that will be affecting this GranularBody in the next...
Vec3 getVelocity() const
Returns the current world velocity of the GranularBody.
void setRotation(const Quat &q)
Set the rotation of the GranularBody relative to world coordinate system.
Vec3 getPosition() const
Returns the current world position of the GranularBody.
void setLinearVelocity(double vx, double vy, double vz)
Set the world linear velocity of the GranularBody.
GranularBody::MotionControl getMotionControl() const
void setForce(double fx, double fy, double fz)
Explicitly set the force, given in world coordinate frame, that will be affecting this GranularBody i...
double getRadius() const
Gets the radius of the GranularBody.
void setColor(const Vec4 &color)
Set the color that will be used during rendering of the GranularBody.
agx::Physics::GranularBodyPtr ptr() const
void setPosition(double x, double y, double z)
Set the world position of the GranularBody.
Material * getMaterial() const
Gets the active material on the GranularBody.
double getMass() const
Gets the mass of the GranularBody.
void setMaterial(const Material *material)
Set the material on the GranularBody.
bool isValid() const
Gets true/false if the active GranularBody is valid or not.
bool operator==(const GranularBody &other) const
void setMotionControl(GranularBody::MotionControl motionControl)
Assign new motion control state to this granular body.
void setPosition(const Vec3 &position)
Set the world position of the GranularBody.
void setForce(const Vec3 &force)
Explicitly set the force, given in world coordinate frame, that will be affecting this GranularBody i...
void setTorque(double tx, double ty, double tz)
Explicitly set the torque, given in world coordinate frame, that will be affecting this GranularBody ...
Vec3 getForce() const
Gets the current active force on the GranularBody that will be active during the next simulation step...
void addForce(double fx, double fy, double fz)
Adds the force, given in world coordinate frame, that will be affecting this GranularBody in the next...
void setRotation(const EulerAngles &e)
Set the rotation of the GranularBody relative to world coordinate system.
Vec3 getAngularVelocity() const
Returns the current world angular velocity of the GranularBody.
void addTorque(const Vec3 &torque)
Adds the torque, given in world coordinate frame, that will be affecting this GranularBody in the nex...
MotionControl
There are two forms of motion allowed : -KINEMATICS means that motion is scripted; -DYNAMICS means th...
Definition: GranularBody.h:44
bool is(agx::Physics::GranularBodyPtr granularBody) const
void setLinearVelocity(const Vec3 &velocity)
Set the world linear velocity of the GranularBody.
void setVelocity(double vx, double vy, double vz)
GranularBody(agx::Physics::GranularBodyPtr)
Create a wrapper around an agx::Physics::GranularBodyPtr.
A class describing a Material which is attached to a Geometry.
Definition: Material.h:41
The object holding quaternions and providing operations on these.
Definition: Quat.h:55
A 3 dimensional vector which can be used to define a point or a vector and contains basic arithmetic.
Definition: Vec3.h:40
A 4 dimensional vector and contains basic arithmetic.
Definition: Vec4.h:33
Namespace for Momentum Scripting API.
Definition: AffineMatrix4x4.h:29