mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +03:00
AIS_InteractiveObject, virtual methods ::SetColor(), ::Color() returning/accepting Quantity_NameOfColor have been removed. Virtual method ::SetMaterial() accepting Graphic3d_NameOfMaterial has been also removed. V3d_View, V3d_Viewer, V3d_AmbientLight, V3d_DirectionalLight, V3d_Light, V3d_PositionalLight, V3d_SpotLight, Aspect_Window, methods accepting Quantity_NameOfColor have been removed (duplicates) or color argument(s) replaced with Quantity_Color.
75 lines
3.0 KiB
C++
75 lines
3.0 KiB
C++
// Created on: 1993-04-26
|
|
// Created by: Jean-Louis Frenkel
|
|
// Copyright (c) 1993-1999 Matra Datavision
|
|
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
//
|
|
// This file is part of Open CASCADE Technology software library.
|
|
//
|
|
// This library is free software; you can redistribute it and/or modify it under
|
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
|
// by the Free Software Foundation, with special exception defined in the file
|
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
// distribution for complete text of the license and disclaimer of any warranty.
|
|
//
|
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
|
// commercial license or contractual agreement.
|
|
|
|
#ifndef _Prs3d_LineAspect_HeaderFile
|
|
#define _Prs3d_LineAspect_HeaderFile
|
|
|
|
#include <Aspect_TypeOfLine.hxx>
|
|
#include <Graphic3d_AspectLine3d.hxx>
|
|
#include <Prs3d_BasicAspect.hxx>
|
|
#include <Quantity_Color.hxx>
|
|
|
|
//! A framework for defining how a line will be displayed
|
|
//! in a presentation. Aspects of line display include
|
|
//! width, color and type of line.
|
|
//! The definition set by this class is then passed to the
|
|
//! attribute manager Prs3d_Drawer.
|
|
//! Any object which requires a value for line aspect as
|
|
//! an argument may then be given the attribute manager
|
|
//! as a substitute argument in the form of a field such as myDrawer for example.
|
|
class Prs3d_LineAspect : public Prs3d_BasicAspect
|
|
{
|
|
DEFINE_STANDARD_RTTIEXT(Prs3d_LineAspect, Prs3d_BasicAspect)
|
|
public:
|
|
|
|
//! Constructs a framework for line aspect defined by
|
|
//! - the color aColor
|
|
//! - the type of line aType and
|
|
//! - the line thickness aWidth.
|
|
//! Type of line refers to whether the line is solid or dotted, for example.
|
|
Standard_EXPORT Prs3d_LineAspect (const Quantity_Color& theColor, const Aspect_TypeOfLine theType, const Standard_Real theWidth);
|
|
|
|
Prs3d_LineAspect(const Handle(Graphic3d_AspectLine3d)& theAspect) : myAspect (theAspect) {}
|
|
|
|
//! Sets the line color defined at the time of construction.
|
|
//! Default value: Quantity_NOC_YELLOW
|
|
void SetColor (const Quantity_Color& theColor) { myAspect->SetColor (theColor); }
|
|
|
|
//! Sets the type of line defined at the time of construction.
|
|
//! This could, for example, be solid, dotted or made up of dashes.
|
|
//! Default value: Aspect_TOL_SOLID
|
|
void SetTypeOfLine (const Aspect_TypeOfLine theType) { myAspect->SetType (theType); }
|
|
|
|
//! Sets the line width defined at the time of construction.
|
|
//! Default value: 1.
|
|
void SetWidth (const Standard_Real theWidth) { myAspect->SetWidth (theWidth); }
|
|
|
|
//! Returns the line aspect. This is defined as the set of
|
|
//! color, type and thickness attributes.
|
|
const Handle(Graphic3d_AspectLine3d)& Aspect() const { return myAspect; }
|
|
|
|
void SetAspect (const Handle(Graphic3d_AspectLine3d)& theAspect) { myAspect = theAspect; }
|
|
|
|
protected:
|
|
|
|
Handle(Graphic3d_AspectLine3d) myAspect;
|
|
|
|
};
|
|
|
|
DEFINE_STANDARD_HANDLE(Prs3d_LineAspect, Prs3d_BasicAspect)
|
|
|
|
#endif // _Prs3d_LineAspect_HeaderFile
|