Commit c66034cb authored by Will Schroeder's avatar Will Schroeder
Browse files

ENH: Example comments.

parent 14550149
...@@ -3,16 +3,29 @@ ...@@ -3,16 +3,29 @@
Program: Visualization Library Program: Visualization Library
Module: Trans.hh Module: Trans.hh
Language: C++ Language: C++
Date: 5/8/94 Date: $Date$
Version: 1.6 Version: $Revision$
This file is part of the Visualization Library. No part of this file or its Description:
contents may be copied, reproduced or altered in any way without the express ---------------------------------------------------------------------------
written consent of the authors. This file is part of the Visualization Library. No part of this file
or its contents may be copied, reproduced or altered in any way
without the express written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/ =========================================================================*/
// .NAME vlTransform - a general matrix transformation class
// .SECTION Description
// vlTransform maintains a stack of 4x4 transformation matrices. A
// variety of methods are provided to manipulate the translation,
// scale, and rotation components of the matrix. Methods operate on
// the transformation at the top of the stack.
// .SECTION Caveats
// By default the initial matrix is the identity matrix.
// .EXAMPLE XFormSph.cc
#ifndef __vlTransform_hh #ifndef __vlTransform_hh
#define __vlTransform_hh #define __vlTransform_hh
...@@ -22,19 +35,14 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994 ...@@ -22,19 +35,14 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
#include "Normals.hh" #include "Normals.hh"
#include "Vectors.hh" #include "Vectors.hh"
// .NAME vlTransform - a general matrix transformation class
// .LIBRARY common
// .HEADER Visualization Library
// .INCLUDE common/Trans.hh
// .FILE Trans.hh
// .FILE Trans.cc
class vlTransform : public vlObject class vlTransform : public vlObject
{ {
public: public:
vlTransform (); vlTransform ();
vlTransform (const vlTransform& t); vlTransform (const vlTransform& t);
~vlTransform (); ~vlTransform ();
char *GetClassName () {return "vlTransform";};
void PrintSelf (ostream& os, vlIndent indent);
void Identity (); void Identity ();
void Pop (); void Pop ();
void PostMultiply (); void PostMultiply ();
...@@ -55,12 +63,9 @@ class vlTransform : public vlObject ...@@ -55,12 +63,9 @@ class vlTransform : public vlObject
void GetScale ( float & x, float & y, float & z); void GetScale ( float & x, float & y, float & z);
vlMatrix4x4 & GetMatrix (); vlMatrix4x4 & GetMatrix ();
void GetMatrix (vlMatrix4x4 & ctm); void GetMatrix (vlMatrix4x4 & ctm);
char *GetClassName () {return "vlTransform";};
void PrintSelf (ostream& os, vlIndent indent);
void Concatenate (vlMatrix4x4 & matrix); void Concatenate (vlMatrix4x4 & matrix);
void Multiply4x4 ( vlMatrix4x4 & a, vlMatrix4x4 & b, vlMatrix4x4 & c); void Multiply4x4 ( vlMatrix4x4 & a, vlMatrix4x4 & b, vlMatrix4x4 & c);
void PointMultiply (float in[4],float out[4]) void PointMultiply (float in[4],float out[4]);
{this->Stack[0]->PointMultiply(in,out);};
void MultiplyPoints(vlPoints *inPts, vlPoints *outPts); void MultiplyPoints(vlPoints *inPts, vlPoints *outPts);
void MultiplyVectors(vlVectors *inVectors, vlVectors *outVectors); void MultiplyVectors(vlVectors *inVectors, vlVectors *outVectors);
void MultiplyNormals(vlNormals *inNormals, vlNormals *outNormals); void MultiplyNormals(vlNormals *inNormals, vlNormals *outNormals);
...@@ -77,4 +82,9 @@ class vlTransform : public vlObject ...@@ -77,4 +82,9 @@ class vlTransform : public vlObject
}; };
inline void vlTransform::PointMultiply (float in[4],float out[4])
{
this->Stack[0]->PointMultiply(in,out);
}
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment