MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / dCreateRayMotions

Function dCreateRayMotions

ogsr_engine/xrGame/dRayMotions.cpp:96–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95void dGeomRayMotionDestroy(dGeomID ray) { dGeomDestroy(((dxRayMotions*)dGeomGetClassData(ray))->ray); }
96dxGeom* dCreateRayMotions(dSpaceID space)
97{
98 if (dRayMotionsClassUser == -1)
99 {
100 dGeomClass c;
101 c.bytes = sizeof(dxRayMotions);
102 c.collider = &dRayMotionsColliderFn;
103 c.aabb = &dRayMotionsAABB;
104 c.aabb_test = 0;
105 c.dtor = &dGeomRayMotionDestroy;
106 dRayMotionsClassUser = dCreateGeomClass(&c);
107 }
108 dGeomID g = dCreateGeom(dRayMotionsClassUser);
109 if (space)
110 dSpaceAdd(space, g);
111 dxRayMotions* c = (dxRayMotions*)dGeomGetClassData(g);
112 c->ray = dCreateRay(space, REAL(1.));
113 return g;
114}
115
116void dGeomRayMotionsSet(dGeomID g, const dReal* p, const dReal* d, dReal l)
117{

Callers 1

CreateMethod · 0.85

Calls 5

dCreateGeomClassFunction · 0.85
dCreateGeomFunction · 0.85
dSpaceAddFunction · 0.85
dGeomGetClassDataFunction · 0.85
dCreateRayFunction · 0.85

Tested by

no test coverage detected