0028726: Quantity_NameOfColor should be replaced by Quantity_Color in function input...
[occt.git] / src / Prs3d / Prs3d_PointAspect.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-04-26
2// Created by: Jean-Louis Frenkel
3// Copyright (c) 1993-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _Prs3d_PointAspect_HeaderFile
18#define _Prs3d_PointAspect_HeaderFile
19
42cf5bc1 20#include <Prs3d_BasicAspect.hxx>
4e1bc39a 21#include <Graphic3d_AspectMarker3d.hxx>
42cf5bc1 22#include <Graphic3d_MarkerImage.hxx>
42cf5bc1 23
24//! This class defines attributes for the points
25//! The points are drawn using markers, whose size does not depend on
26//! the zoom value of the views.
27class Prs3d_PointAspect : public Prs3d_BasicAspect
28{
4e1bc39a 29 DEFINE_STANDARD_RTTIEXT(Prs3d_PointAspect, Prs3d_BasicAspect)
42cf5bc1 30public:
31
4e1bc39a 32 Standard_EXPORT Prs3d_PointAspect(const Aspect_TypeOfMarker theType, const Quantity_Color& theColor, const Standard_Real theScale);
42cf5bc1 33
4e1bc39a 34 //! Defines the user defined marker point.
35 Standard_EXPORT Prs3d_PointAspect (const Quantity_Color& theColor,
36 const Standard_Integer theWidth,
37 const Standard_Integer theHeight,
38 const Handle(TColStd_HArray1OfByte)& theTexture);
42cf5bc1 39
4e1bc39a 40 Prs3d_PointAspect (const Handle(Graphic3d_AspectMarker3d)& theAspect) : myAspect (theAspect) {}
41
42cf5bc1 42 //! defines the color to be used when drawing a point.
43 //! Default value: Quantity_NOC_YELLOW
87432b82 44 void SetColor (const Quantity_Color& theColor) { myAspect->SetColor (theColor); }
45
42cf5bc1 46 //! defines the type of representation to be used when drawing a point.
47 //! Default value: Aspect_TOM_PLUS
4e1bc39a 48 void SetTypeOfMarker (const Aspect_TypeOfMarker theType) { myAspect->SetType (theType); }
42cf5bc1 49
50 //! defines the size of the marker used when drawing a point.
51 //! Default value: 1.
4e1bc39a 52 void SetScale (const Standard_Real theScale) { myAspect->SetScale (theScale); }
42cf5bc1 53
4e1bc39a 54 const Handle(Graphic3d_AspectMarker3d)& Aspect() const { return myAspect; }
55
56 void SetAspect (const Handle(Graphic3d_AspectMarker3d)& theAspect) { myAspect = theAspect; }
57
42cf5bc1 58 //! Returns marker's texture size.
4e1bc39a 59 void GetTextureSize (Standard_Integer& theWidth, Standard_Integer& theHeight) const { myAspect->GetTextureSize (theWidth, theHeight); }
42cf5bc1 60
61 //! Returns marker's texture.
4e1bc39a 62 const Handle(Graphic3d_MarkerImage)& GetTexture() const { return myAspect->GetMarkerImage(); }
42cf5bc1 63
64protected:
65
42cf5bc1 66 Handle(Graphic3d_AspectMarker3d) myAspect;
67
42cf5bc1 68};
69
4e1bc39a 70DEFINE_STANDARD_HANDLE(Prs3d_PointAspect, Prs3d_BasicAspect)
42cf5bc1 71
72#endif // _Prs3d_PointAspect_HeaderFile