From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/classNLMISC_1_1CTriangle.html | 405 +++++++++++++++++++++++++ 1 file changed, 405 insertions(+) create mode 100644 docs/doxygen/nel/classNLMISC_1_1CTriangle.html (limited to 'docs/doxygen/nel/classNLMISC_1_1CTriangle.html') diff --git a/docs/doxygen/nel/classNLMISC_1_1CTriangle.html b/docs/doxygen/nel/classNLMISC_1_1CTriangle.html new file mode 100644 index 00000000..df4a3224 --- /dev/null +++ b/docs/doxygen/nel/classNLMISC_1_1CTriangle.html @@ -0,0 +1,405 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
+
+ + +
+ + +
+Docs + +
+  + + + + + +
Documentation 
+ +
+Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  
+

NLMISC::CTriangle Class Reference

A simple triangles of 3 points. +More... +

+#include <triangle.h> +

+

Inheritance diagram for NLMISC::CTriangle: +

+ +NLMISC::CTriangleColor +NLMISC::CTriangleColorUV +NLMISC::CTriangleUV +NL3D::CTrianglePatch + +List of all members. + + + + + + + + + + + + + +

Public Methods

 CTriangle ()
 Constructor. More...

 CTriangle (const CVector &a, const CVector &b, const CVector &c)
 Constructor. More...

bool intersect (const CVector &p0, const CVector &p1, CVector &hit, const class NLMISC::CPlane &plane) const
 Intersection detection with a segment. More...

void computeGradient (float c0, float c1, float c2, CVector &grad) const
 3D Gradient computation. More...


Public Attributes

CVector V0
CVector V1
CVector V2
+

Detailed Description

+A simple triangles of 3 points. +

+

+Author:
+Lionel Berenguier , Nevrax France
+Date:
+2000
+

+ +

+Definition at line 51 of file triangle.h.


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NLMISC::CTriangle::CTriangle   [inline]
+
+ + + + + +
+   + + +

+Constructor. +

+ +

+Definition at line 58 of file triangle.h. +

+Referenced by computeGradient, NLMISC::CTriangleColorUV::operator=, NLMISC::CTriangleUV::operator=, and NLMISC::CTriangleColor::operator=.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
NLMISC::CTriangle::CTriangle const CVector  a,
const CVector  b,
const CVector  c
[inline]
+
+ + + + + +
+   + + +

+Constructor. +

+ +

+Definition at line 60 of file triangle.h. +

+References V0, V1, and V2.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void NLMISC::CTriangle::computeGradient float   c0,
float   c1,
float   c2,
CVector  grad
const
+
+ + + + + +
+   + + +

+3D Gradient computation. +

+Given 3 values at the 3 corners 'ci' (gouraud, uv....), this method compute the gradients Grad. The formula to compute the interpolated value according to a 3d position 'v' in space is then simply:
+ c(v)= c0 + grad*(v-V0) +

+Definition at line 67 of file triangle.cpp. +

+References CTriangle, V0, V1, and V2.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool NLMISC::CTriangle::intersect const CVector  p0,
const CVector  p1,
CVector  hit,
const class NLMISC::CPlane  plane
const
+
+ + + + + +
+   + + +

+Intersection detection with a segment. +

+You must pass the normalized plane of the triangle as parameter.

+Parameters:
+ + + + + +
p0  +is the first point of the segment.
p1  +is the second point of the segment.
hit  +will receive the coordinate of the intersection if the method returns true.
plane  +is the plane of the triangle. Build it like this:
  CPlane plane;
+  plane.make (triangle.V0, triangle.V1, triangle.V2);
+
+
+Returns:
+true if the segement [p0,p1] intersects the triangle else false.
+


Member Data Documentation

+

+ + + + +
+ + +
CVector NLMISC::CTriangle::V0 +
+
+ + + + + +
+   + + +

+ +

+Definition at line 54 of file triangle.h. +

+Referenced by NL3D::CBSPTree::CBSPNode::CBSPNode, computeGradient, CTriangle, NL3D::CDriverUser::drawTriangle, NL3D::CCubeGrid::insert, NL3D::CBSPTree::CBSPNode::insert, NL3D::CCubeGrid::project, NL3D::CZoneLighter::rayTraceTriangle, and NL3D::CZoneLighter::testRaytrace.

+

+ + + + +
+ + +
CVector NLMISC::CTriangle::V1 +
+
+ + + + + +
+   + + +

+ +

+Definition at line 54 of file triangle.h. +

+Referenced by NL3D::CBSPTree::CBSPNode::CBSPNode, computeGradient, CTriangle, NL3D::CDriverUser::drawTriangle, NL3D::CCubeGrid::insert, NL3D::CBSPTree::CBSPNode::insert, NL3D::CCubeGrid::project, NL3D::CZoneLighter::rayTraceTriangle, and NL3D::CZoneLighter::testRaytrace.

+

+ + + + +
+ + +
CVector NLMISC::CTriangle::V2 +
+
+ + + + + +
+   + + +

+ +

+Definition at line 54 of file triangle.h. +

+Referenced by NL3D::CBSPTree::CBSPNode::CBSPNode, computeGradient, CTriangle, NL3D::CDriverUser::drawTriangle, NL3D::CCubeGrid::insert, NL3D::CBSPTree::CBSPNode::insert, NL3D::CCubeGrid::project, NL3D::CZoneLighter::rayTraceTriangle, and NL3D::CZoneLighter::testRaytrace.

+


The documentation for this class was generated from the following files: + + + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1