MCPcopy Create free account
hub / github.com/axmolengine/axmol / initPlane

Method initPlane

core/3d/Plane.cpp:51–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void Plane::initPlane(const Vec3& p1, const Vec3& p2, const Vec3& p3)
52{
53 Vec3 p21 = p2 - p1;
54 Vec3 p32 = p3 - p2;
55 Vec3::cross(p21, p32, &_normal);
56 _normal.normalize();
57 _dist = _normal.dot(p1);
58}
59
60void Plane::initPlane(const Vec3& normal, float dist)
61{

Callers 1

createPlaneMethod · 0.80

Calls 4

crossFunction · 0.50
normalizeMethod · 0.45
dotMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected