/usr/include/oce/Graphic3d_CLight.hxx is in liboce-visualization-dev 0.17.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | // 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 _Graphic3d_CLight_HeaderFile
#define _Graphic3d_CLight_HeaderFile
#include <InterfaceGraphic_Graphic3d.hxx>
#include <InterfaceGraphic_Visual3d.hxx>
#include <Graphic3d_Vec.hxx>
//! Light definition
struct Graphic3d_CLight
{
public:
Graphic3d_Vec4 Color; //!< light color
Graphic3d_Vec4 Position; //!< light position
Graphic3d_Vec4 Direction; //!< direction of directional/spot light
Graphic3d_Vec4 Params; //!< packed light parameters
Standard_Integer Type; //!< Visual3d_TypeOfLightSource enumeration
Standard_Boolean IsHeadlight; //!< flag to mark head light
//! Const attenuation factor of positional light source
Standard_ShortReal ConstAttenuation() const { return Params.x(); }
//! Linear attenuation factor of positional light source
Standard_ShortReal LinearAttenuation() const { return Params.y(); }
//! Const, Linear attenuation factors of positional light source
Graphic3d_Vec2 Attenuation() const { return Params.xy(); }
//! Angle in radians of the cone created by the spot
Standard_ShortReal Angle() const { return Params.z(); }
//! Intensity distribution of the spot light, with 0..1 range.
Standard_ShortReal Concentration() const { return Params.w(); }
Standard_ShortReal& ChangeConstAttenuation() { return Params.x(); }
Standard_ShortReal& ChangeLinearAttenuation() { return Params.y(); }
Graphic3d_Vec2& ChangeAttenuation() { return Params.xy(); }
Standard_ShortReal& ChangeAngle() { return Params.z(); }
Standard_ShortReal& ChangeConcentration() { return Params.w(); }
public:
//! Empty constructor
Graphic3d_CLight()
: Color (1.0f, 1.0f, 1.0f, 1.0f),
Position (0.0f, 0.0f, 0.0f, 1.0f),
Direction (0.0f, 0.0f, 0.0f, 0.0f),
Params (0.0f, 0.0f, 0.0f, 0.0f),
Type (0),
IsHeadlight (Standard_False)
{
//
}
public:
DEFINE_STANDARD_ALLOC
};
#endif // Graphic3d_CLight_HeaderFile
|