21 "description" :
"A 2D Layer: visible (image), or virtual (group).",
37 "VuoList_VuoSceneObject"
81 VuoPoint3d center3d =
VuoPoint3d_make(transform.translation.x, transform.translation.y, 0);
125 static VuoLayer VuoLayer_makeWithShadowInternal(
VuoText name,
VuoImage image, VuoPoint2d center,
VuoReal rotation,
VuoReal width,
VuoReal alpha,
VuoBoolean preservePhysicalSize,
VuoColor shadowColor,
VuoReal shadowBlur,
VuoReal shadowAngle,
VuoReal shadowDistance,
VuoBoolean isRealSize)
134 float rotationInRadians = rotation * M_PI/180.;
141 VuoPoint2d layerCenter =
VuoPoint2d_make(layerCenter3d.x, layerCenter3d.y);
157 float shadowAngleInRadians = shadowAngle * M_PI/180.;
158 VuoPoint3d shadowOffset3d =
VuoPoint3d_make(shadowDistance * cos(shadowAngleInRadians),
159 shadowDistance * sin(shadowAngleInRadians),
162 VuoPoint2d shadowCenter =
VuoPoint2d_make(shadowCenter3d.x, shadowCenter3d.y);
197 return VuoLayer_makeWithShadowInternal(name,image,center,rotation,width,alpha,
false,shadowColor,shadowBlur,shadowAngle,shadowDistance,
false);
217 return VuoLayer_makeWithShadowInternal(name,image,center,0,1,alpha,preservePhysicalSize,shadowColor,shadowBlur,shadowAngle,shadowDistance,
true);
383 for (
unsigned long i = 1; i <= childLayerCount; ++i)
444 if (childLayerCount == 0)
450 for (
unsigned int i = 0; i < childLayerCount; ++i)
452 childLayersData[i] = (
VuoLayer)objects[i];
472 if (viewportWidth > 0)
480 b.center.x += anchorOffset.x * b.size.x;
481 b.center.y += anchorOffset.y * b.size.y;
504 VuoPoint2d mesh0 = (VuoPoint2d){ positions[0], positions[1] };
505 VuoTransform_getBillboardMatrix(image->
pixelsWide, image->
pixelsHigh, image->
scaleFactor,
VuoSceneObject_shouldPreservePhysicalSize(so),
VuoSceneObject_getTranslation(so).x,
VuoSceneObject_getTranslation(so).y, viewportWidth, viewportHeight, backingScaleFactor, mesh0, matrix);
519 for (
unsigned long i = 1; i <= childObjectCount; ++i)
524 if (!isnan(childBoundingBox.center.x))
526 if (!isnan(b.center.x))
529 b = childBoundingBox;
553 VuoPoint3d childTranslation = childTransform.translation;
554 VuoPoint2d boundsCenter = rect.center;
555 VuoPoint3d parentTranslation =
VuoPoint3d_make(childTranslation.x - boundsCenter.x, childTranslation.y - boundsCenter.y, 0);
558 boundsCenter.x += rect.size.x * .5f;
560 boundsCenter.x -= rect.size.x * .5f;
563 boundsCenter.y -= rect.size.y * .5f;
565 boundsCenter.y += rect.size.y * .5f;
570 parentTransform.translation = parentTranslation;