1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: b3dentty.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _B3D_B3DENTITY_HXX
32 #define _B3D_B3DENTITY_HXX
34 #ifndef _B3D_B3DCOLOR_HXX
35 #include "b3dcolor.hxx"
38 #ifndef _B3D_POINT4D_HXX
39 #include "point4d.hxx"
42 #ifndef _B3D_BUCKET_HXX
48 /*************************************************************************
50 |* Merkt sich einen Punkt plus Normale plus Texturkoordinate
51 |* (in Zukunft noch weitere Attribute, bsp. Farbe, Kante, Linienmodus
53 \************************************************************************/
57 class B3dTransformationSet
;
63 // Data defining this point, it's normal and texture coordinates
66 Vector3D aPlaneNormal
;
70 // Ist die diesem Punkt folgende Kante sichtbar ?
74 // Gueltigkeit der geometrischen Daten
77 // Wird eine Normale verwendet ?
78 unsigned bNormalUsed
: 1;
80 // Wird eine Texturkoordinate verwendet ?
81 unsigned bTexCoorUsed
: 1;
83 // Sind die geometrischen Daten schon in DeviceKoordinaten
85 unsigned bDeviceCoor
: 1;
88 B3dEntity() { Reset(); }
90 BOOL
IsValid() { return bValid
; }
91 void SetValid(BOOL bNew
=TRUE
) { bValid
= bNew
; }
93 BOOL
IsNormalUsed() { return bNormalUsed
; }
94 void SetNormalUsed(BOOL bNew
=TRUE
) { bNormalUsed
= bNew
; }
96 BOOL
IsTexCoorUsed() { return bTexCoorUsed
; }
97 void SetTexCoorUsed(BOOL bNew
=TRUE
) { bTexCoorUsed
= bNew
; }
99 BOOL
IsDeviceCoor() { return bDeviceCoor
; }
100 void SetDeviceCoor(BOOL bNew
=TRUE
) { bDeviceCoor
= bNew
; }
102 BOOL
IsEdgeVisible() { return bEdgeFlag
; }
103 void SetEdgeVisible(BOOL bNew
=TRUE
) { bEdgeFlag
= bNew
; }
105 Point4D
& Point() { return aPoint
; }
106 Vector3D
& Normal() { return aNormal
; }
107 Vector3D
& PlaneNormal() { return aPlaneNormal
; }
108 Vector3D
& TexCoor() { return aTexCoor
; }
109 B3dColor
& Color() { return aColor
; }
110 UINT8
& EdgeFlag() { return bEdgeFlag
; }
112 double GetX() { return aPoint
.X(); }
113 void SetX(double fNew
) { aPoint
.X() = fNew
; }
115 double GetY() { return aPoint
.Y(); }
116 void SetY(double fNew
) { aPoint
.Y() = fNew
; }
118 double GetZ() { return aPoint
.Z(); }
119 void SetZ(double fNew
) { aPoint
.Z() = fNew
; }
123 void CalcInBetween(B3dEntity
& rOld1
,
124 B3dEntity
& rOld2
, double t
);
125 void CalcMiddle(B3dEntity
& rOld1
,
129 /*************************************************************************
131 |* Bucket fuer geometrische Daten
133 \************************************************************************/
135 BASE3D_DECL_BUCKET(B3dEntity
, Bucket
)
137 }//end of namespace binfilter
139 #endif // _B3D_B3DENTITY_HXX