mirror of
https://github.com/leozide/leocad.git
synced 2026-09-12 01:23:35 +00:00
Renamed shadowless to cast shadow.
This commit is contained in:
+7
-7
@@ -42,9 +42,7 @@ lcLight::lcLight(const lcVector3& Position, const lcVector3& TargetPosition, lcL
|
||||
}
|
||||
|
||||
mPOVRayLight = false;
|
||||
mShadowless = false;
|
||||
mEnableCutoff = false;
|
||||
mColor = lcVector3(1.0f, 1.0f, 1.0f);
|
||||
mAttenuation = lcVector3(1.0f, 0.0f, 0.0f);
|
||||
mLightFactor[0] = LightType == lcLightType::Directional ? 11.4f : 0.25f;
|
||||
mLightFactor[1] = LightType == lcLightType::Area ? 0.25f : LightType == lcLightType::Spot ? 0.150f : 0.0f;
|
||||
@@ -108,7 +106,7 @@ void lcLight::SaveLDraw(QTextStream& Stream) const
|
||||
if (mPOVRayLight)
|
||||
Stream << QLatin1String("0 !LEOCAD LIGHT POV_RAY") << LineEnding;
|
||||
|
||||
if (mShadowless)
|
||||
if (!mCastShadow)
|
||||
Stream << QLatin1String("0 !LEOCAD LIGHT SHADOWLESS") << LineEnding;
|
||||
|
||||
if (mPositionKeys.GetSize() > 1)
|
||||
@@ -485,7 +483,7 @@ bool lcLight::ParseLDrawLine(QTextStream& Stream)
|
||||
}
|
||||
else if (Token == QLatin1String("SHADOWLESS"))
|
||||
{
|
||||
mShadowless = true;
|
||||
mCastShadow = false;
|
||||
}
|
||||
else if ((Token == QLatin1String("POWER_KEY")) || (Token == QLatin1String("STRENGTH_KEY")))
|
||||
mSpotExponentKeys.LoadKeysLDraw(Stream);
|
||||
@@ -609,9 +607,6 @@ void lcLight::UpdateLight(lcStep Step, lcLightProperties Props, int Property)
|
||||
mLightSpecular = Props.mLightSpecular;
|
||||
mLightSpecularKeys.ChangeKey(mLightSpecular, Step, false);
|
||||
break;
|
||||
case LC_LIGHT_SHADOWLESS:
|
||||
mShadowless = Props.mShadowless;
|
||||
break;
|
||||
case LC_LIGHT_EXPONENT:
|
||||
if (Props.mPOVRayLight)
|
||||
{
|
||||
@@ -877,6 +872,11 @@ void lcLight::SetColor(const lcVector3& Color, lcStep Step, bool AddKey)
|
||||
mColorKeys.ChangeKey(Color, Step, AddKey);
|
||||
}
|
||||
|
||||
void lcLight::SetCastShadow(bool CastShadow)
|
||||
{
|
||||
mCastShadow = CastShadow;
|
||||
}
|
||||
|
||||
void lcLight::InsertTime(lcStep Start, lcStep Time)
|
||||
{
|
||||
mPositionKeys.InsertTime(Start, Time);
|
||||
|
||||
Reference in New Issue
Block a user