123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- #pragma once
- #include "Mat4.h"
- #include "Zeichnung3D.h"
- #include "Punkt.h"
- struct D3D11_VIEWPORT;
- namespace Framework
- {
- struct MausEreignis;
- class Render3D;
- class Welt3D;
- struct ViewPort
- {
- float x;
- float y;
- float width;
- float height;
- float front;
- float back;
- };
-
- class Kam3D : public virtual Framework::ReferenceCounter
- {
- public:
- class Style
- {
- public:
- const static __int64 Movable = 0x1;
- const static __int64 Rotatable = 0x2;
- const static __int64 Zoomable = 0x4;
- const static __int64 Tick = 0x8;
- };
- protected:
- bool rend;
- private:
- Mat4< float > view;
- Mat4< float > proj;
- float openingAngle;
- float minZ;
- float maxZ;
- Vec3< float > pos;
- float rotX;
- float rotY;
- float rotZ;
- ViewPort viewport;
- Welt3D *welt;
- __int64 style;
-
- void updateMatrix();
- public:
-
- DLLEXPORT Kam3D();
-
- DLLEXPORT ~Kam3D();
-
- DLLEXPORT void setPosition( Vec3< float > pos );
-
-
- DLLEXPORT void scrollIn( float val );
-
-
- DLLEXPORT void scrollOut( float val );
-
-
- DLLEXPORT void setAusrichtung( Vec3< float > ziel );
-
-
- DLLEXPORT void setRotation( Vec3< float > rotation );
-
-
- DLLEXPORT void setBildschirmPosition( Punkt p );
-
-
-
- DLLEXPORT void setBildschirmPosition( int x, int y );
-
-
- DLLEXPORT void setBildschirmSize( Punkt p );
-
-
-
- DLLEXPORT void setBildschirmSize( int br, int hi );
-
-
- DLLEXPORT void setWelt( Welt3D *w );
-
-
- DLLEXPORT void setStyle( __int64 style );
-
-
-
- DLLEXPORT void setStyle( __int64 style, bool add_remove );
-
-
- DLLEXPORT void addStyle( __int64 style );
-
-
- DLLEXPORT void removeStyle( __int64 style );
-
-
-
- DLLEXPORT virtual bool tick( double tv );
-
-
- DLLEXPORT virtual void doMausEreignis( MausEreignis &me );
-
-
- DLLEXPORT virtual void doTastaturEreignis( TastaturEreignis &te );
-
-
-
- DLLEXPORT bool hatStyle( __int64 style ) const;
-
-
-
- DLLEXPORT bool hatStyleNicht( __int64 style ) const;
-
- DLLEXPORT const ViewPort *zViewPort() const;
-
- DLLEXPORT const Vec3< float > &getWorldPosition() const;
-
-
- DLLEXPORT const Vec3< float > getWorldPosition( Punkt screen ) const;
-
-
- DLLEXPORT const Vec3< float > getWorldDirection( Punkt screen ) const;
-
- DLLEXPORT const Mat4< float > &getProjectionMatrix() const;
-
- DLLEXPORT const Mat4< float > &getViewMatrix() const;
-
- DLLEXPORT const Vec3< float > getRotation() const;
-
- DLLEXPORT const Punkt getScreenPos() const;
-
- DLLEXPORT const Punkt getScreenSize() const;
-
- DLLEXPORT Welt3D *getWelt() const;
-
- DLLEXPORT Welt3D *zWelt() const;
- };
- }
|