MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / VisualContactPoint

Method VisualContactPoint

testbed/common/VisualContactPoint.cpp:39–51  ·  view source on GitHub ↗

Constructor

Source from the content-addressed store, hash-verified

37
38// Constructor
39VisualContactPoint::VisualContactPoint(const openglframework::Vector3& position,
40 const openglframework::Vector3& normalLineEndPointLocal, const openglframework::Color& color)
41 : mVBOVerticesNormalLine(GL_ARRAY_BUFFER), mColor(color) {
42
43 mContactNormalLinePoints[0] = openglframework::Vector3(0, 0, 0);
44 mContactNormalLinePoints[1] = (normalLineEndPointLocal - position) * 0.5f;
45
46 // Initialize the position where the mesh will be rendered
47 translateWorld(position);
48
49 // Create the VBO and VAO to render the contact normal line
50 createContactNormalLineVBOAndVAO();
51}
52
53// Destructor
54VisualContactPoint::~VisualContactPoint() {

Callers

nothing calls this directly

Calls 1

Vector3Class · 0.50

Tested by

no test coverage detected