Class Matrix3D

java.lang.Object
  |
  +--Matrix3D

class Matrix3D
extends java.lang.Object

Esta clase transforma conjuntos de coordenadas tridimensionales para su representación en pantalla. También permite aplicar rotaciones, traslaciones y escalado sobre los tres ejes. Está basada en código de libre distribución: Author: Daeron Meyer Copyright (c) 1995 by The Geometry Center, University of Minnesota Distributed under the terms of the GNU Library General Public License 12-14-95


Field Summary
(package private) static double pi
           
(package private)  float xo
           
(package private)  float xx
           
(package private)  float xy
           
(package private)  float xz
           
(package private)  float yo
           
(package private)  float yx
           
(package private)  float yy
           
(package private)  float yz
           
(package private)  float zo
           
(package private)  float zx
           
(package private)  float zy
           
(package private)  float zz
           
 
Constructor Summary
(package private) Matrix3D()
          Crea una nueva matriz unitaria
 
Method Summary
(package private)  void mult(Matrix3D rhs)
          Multiplica la matriz dada por la matriz de rotaciones.
(package private)  void scale(float f)
          Aplica un factor de escala a todas las dimensiones.
(package private)  void scale(float xf, float yf, float zf)
          Scale along each axis independently.
 java.lang.String toString()
          Obtiene las coordenadas en forma de cadena de caracteres.
(package private)  void transform(float[] v, int[] tv, int nvert)
          Transform nvert points from v into tv. v contains the input coordinates in floating point.
(package private)  void translate(float x, float y, float z)
          Translate the origin
(package private)  void unit()
          Reinicializa a una matriz unitaria.
(package private)  void xrot(double theta)
          rotate theta degrees about the x axis
(package private)  void yrot(double theta)
          rotate theta degrees about the y axis
(package private)  void zrot(double theta)
          rotate theta degrees about the z axis
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

xx

float xx

xy

float xy

xz

float xz

xo

float xo

yx

float yx

yy

float yy

yz

float yz

yo

float yo

zx

float zx

zy

float zy

zz

float zz

zo

float zo

pi

static final double pi
Constructor Detail

Matrix3D

Matrix3D()
Crea una nueva matriz unitaria
Method Detail

scale

void scale(float f)
Aplica un factor de escala a todas las dimensiones.
Parameters:
f - Factor de escala.

scale

void scale(float xf,
           float yf,
           float zf)
Scale along each axis independently.
Parameters:
xf - Factor de escala sobre el eje X.
yf - Factor de escala sobre el eje Y.
zf - Factor de escala sobre el eje Z.

translate

void translate(float x,
               float y,
               float z)
Translate the origin

yrot

void yrot(double theta)
rotate theta degrees about the y axis

xrot

void xrot(double theta)
rotate theta degrees about the x axis

zrot

void zrot(double theta)
rotate theta degrees about the z axis

mult

void mult(Matrix3D rhs)
Multiplica la matriz dada por la matriz de rotaciones.
Parameters:
rhs -  

unit

void unit()
Reinicializa a una matriz unitaria.

transform

void transform(float[] v,
               int[] tv,
               int nvert)
Transform nvert points from v into tv. v contains the input coordinates in floating point. Three successive entries in the array constitute a point. tv ends up holding the transformed points as integers; three successive entries per point

toString

public java.lang.String toString()
Obtiene las coordenadas en forma de cadena de caracteres.
Overrides:
toString in class java.lang.Object