1 #define GER61351 //GG_171199 Enable to set an object RGB color
2 // instead a restricted object NameOfColor.
4 #include <Prs3d_PointAspect.ixx>
7 Prs3d_PointAspect::Prs3d_PointAspect (const Aspect_TypeOfMarker aType,
8 const Quantity_Color &aColor,
9 const Standard_Real aScale) {
10 myAspect = new Graphic3d_AspectMarker3d(aType,aColor,aScale);
14 Prs3d_PointAspect::Prs3d_PointAspect (const Aspect_TypeOfMarker aType,
15 const Quantity_NameOfColor aColor,
16 const Standard_Real aScale) {
17 myAspect = new Graphic3d_AspectMarker3d
18 (aType,Quantity_Color(aColor),aScale);
21 Prs3d_PointAspect::Prs3d_PointAspect (const Quantity_Color &aColor,
22 const Standard_Real anId,
23 const Standard_Integer aWidth,
24 const Standard_Integer aHeight,
25 const Handle(TColStd_HArray1OfByte)& aTexture
28 myAspect = new Graphic3d_AspectMarker3d
29 (Aspect_TOM_USERDEFINED,aColor,anId,aWidth,aHeight,aTexture);
33 void Prs3d_PointAspect::SetColor(const Quantity_Color &aColor) {
34 myAspect->SetColor(aColor);
38 void Prs3d_PointAspect::SetColor(const Quantity_NameOfColor aColor) {
39 myAspect->SetColor(Quantity_Color(aColor));
42 void Prs3d_PointAspect::SetTypeOfMarker(const Aspect_TypeOfMarker aType){
43 myAspect->SetType(aType);
46 void Prs3d_PointAspect::SetScale(const Standard_Real aScale){
47 myAspect->SetScale(aScale);
50 Handle (Graphic3d_AspectMarker3d) Prs3d_PointAspect::Aspect () const {
53 void Prs3d_PointAspect::Print (Standard_OStream& s) const {
56 Aspect_TypeOfMarker T;
58 myAspect->Values(C,T,S);
60 case Aspect_TOM_POINT:
61 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " POINT " << S;
64 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " PLUS " << S;
67 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " STAR " << S;
70 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " O " << S;
73 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " X " << S;
75 case Aspect_TOM_O_POINT:
76 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " O_POINT " << S;
78 case Aspect_TOM_O_PLUS:
79 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " O_PLUS " << S;
81 case Aspect_TOM_O_STAR:
82 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " O_STAR " << S;
85 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " O_X " << S;
88 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " BALL " << S;
90 case Aspect_TOM_RING1:
91 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " RING1 " << S;
93 case Aspect_TOM_RING2:
94 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " RING2 " << S;
96 case Aspect_TOM_RING3:
97 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " RING3 " << S;
99 case Aspect_TOM_USERDEFINED:
100 s << "PointAspect: " << Quantity_Color::StringName(C.Name()) << " USERDEFINED " << S;
106 void Prs3d_PointAspect::GetTextureSize(Standard_Integer& AWidth, Standard_Integer& AHeight)
108 myAspect->GetTextureSize( AWidth, AHeight);
111 const Handle(TColStd_HArray1OfByte)& Prs3d_PointAspect::GetTexture()
113 return myAspect->GetTexture();