Main Page   Class Hierarchy   Compound List   Header Files   Compound Members  

ddgobjects.h

This is the verbatim text of the ddgobjects.h include file.
/*
    Copyright (C) 1997, 1998, 1999, 2000 by Alex Pfaffe
        (Digital Dawn Graphics Inc)
  
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.
  
    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.
  
    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free
    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _ddgCamera_Class_
#define _ddgCamera_Class_

#include "struct/ddgcolor.h"
#include "struct/ddgnode.h"
#include "render/ddgcamera.h"
#include "render/ddglight.h"


class WEXP ddgCameraObj: public ddgNode {
    typedef ddgNode super;
        ddgCamera* _camera;
        ddgColor3*  _color;
        float   _scale;
public:
        ddgCameraObj(ddgCamera *c, ddgColor3 *cl, float s = 1.0 ) 
                : _camera(c), _color(cl), _scale(s) {}
        bool draw( ddgContext *ctx);
        void scale ( float s) { _scale = s; }
};

class WEXP ddgLightObj: public ddgNode {
    typedef ddgNode super;
        ddgLight*   _light;
        ddgColor3*  _color;
        float   _scale;
public:
        ddgLightObj(ddgLight *l, ddgColor3 *cl = 0, float s = 1.0 ) 
        : _color(cl), _scale(s), _light(l) { }
        bool draw( ddgContext *ctx);
        void scale ( float s) { _scale = s; }
};

class WEXP ddgGeneralObj: public ddgNode {
    typedef ddgNode super;
public:
        ddgColor3 color;
        ddgVector3 orig;
        enum direction { X = 0, Y, Z };
        ddgGeneralObj( float x = 0, float y = 0, float z = 0)
    { orig.set(x,y,z); color.set(255,255,0); }
};

class WEXP ddgAxis: public ddgGeneralObj {
    typedef ddgGeneralObj super;
public:
        float d;
        ddgAxis(void) { d = 10; }
        bool draw( ddgContext *ctx );
};

class WEXP ddgGrid: public ddgGeneralObj {
    typedef ddgGeneralObj super;
public:
        direction dir;
        float w;
        float h;
        float nw;
        float nh;
        ddgGrid(void) { nw = nh = 10; w = h = 100; dir = Y; }
        ddgGrid(float ww, float hh, float dw, float dh, direction d = Y)
        { w = ww; h = hh; nw = dw; nh = dh; dir = d; }
        bool draw( ddgContext *ctx);
};

class WEXP ddgLattice: public ddgGrid {
    typedef ddgGrid super;
public:
  float d;
  float nd;
  bool draw( ddgContext *ctx);
  ddgLattice( void ) { d = 100; nd = 10; }
};



class WEXP ddgLineObj: public ddgGeneralObj {
        typedef ddgGeneralObj super;
public:
        ddgVector3 *origin;
        ddgVector3 *direction;
        ddgLineObj(void)
        {
                origin = new ddgVector3(0, 0, 0);
                direction = new ddgVector3(1, 1, 1);
        }
        ddgLineObj(ddgVector3 *o, ddgVector3 *d) : origin(o), direction(d) {}
        ~ddgLineObj(void) {delete origin; delete direction;}
        bool draw( ddgContext *ctx );
};

#endif

Generated at Sun Sep 17 19:27:53 2000 for Digital Dawn Graphics Toolkit by doxygen 0.49-991205 written by Dimitri van Heesch, © 1997-1999