21 "description" :
"A 2D Layer: visible (image), or virtual (group).",
37 "VuoList_VuoSceneObject"
82 VuoPoint3d center3d =
VuoPoint3d_make(transform.translation.x, transform.translation.y, 0);
126 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)
135 float rotationInRadians = rotation * M_PI/180.;
142 VuoPoint2d layerCenter =
VuoPoint2d_make(layerCenter3d.x, layerCenter3d.y);
143 VuoLayer layer =
VuoLayer_make(name, image, layerCenter, rotation, width, VuoOrientation_Horizontal, alpha);
158 float shadowAngleInRadians = shadowAngle * M_PI/180.;
159 VuoPoint3d shadowOffset3d =
VuoPoint3d_make(shadowDistance * cos(shadowAngleInRadians),
160 shadowDistance * sin(shadowAngleInRadians),
163 VuoPoint2d shadowCenter =
VuoPoint2d_make(shadowCenter3d.x, shadowCenter3d.y);
164 VuoReal shadowWidth = width * blurredImage->pixelsWide/image->pixelsWide;
165 VuoLayer shadow =
VuoLayer_make(NULL, blurredImage, shadowCenter, rotation, shadowWidth, VuoOrientation_Horizontal, alpha);
198 return VuoLayer_makeWithShadowInternal(name,image,center,rotation,width,alpha,
false,shadowColor,shadowBlur,shadowAngle,shadowDistance,
false);
218 return VuoLayer_makeWithShadowInternal(name,image,center,0,1,alpha,preservePhysicalSize,shadowColor,shadowBlur,shadowAngle,shadowDistance,
true);
384 for (
unsigned long i = 1; i <= childLayerCount; ++i)
445 if (childLayerCount == 0)
451 for (
unsigned int i = 0; i < childLayerCount; ++i)
453 childLayersData[i] = (
VuoLayer)objects[i];
473 if (viewportWidth > 0)
481 b.center.x += anchorOffset.x * b.size.x;
482 b.center.y += anchorOffset.y * b.size.y;
505 VuoPoint2d mesh0 = (VuoPoint2d){ positions[0], positions[1] };
506 VuoTransform_getBillboardMatrix(image->pixelsWide, image->pixelsHigh, image->scaleFactor,
VuoSceneObject_shouldPreservePhysicalSize(so),
VuoSceneObject_getTranslation(so).x,
VuoSceneObject_getTranslation(so).y, viewportWidth, viewportHeight, backingScaleFactor, mesh0, matrix);
520 for (
unsigned long i = 1; i <= childObjectCount; ++i)
525 if (!isnan(childBoundingBox.center.x))
527 if (!isnan(b.center.x))
530 b = childBoundingBox;
554 VuoPoint3d childTranslation = childTransform.translation;
555 VuoPoint2d boundsCenter = rect.center;
556 VuoPoint3d parentTranslation =
VuoPoint3d_make(childTranslation.x - boundsCenter.x, childTranslation.y - boundsCenter.y, 0);
559 boundsCenter.x += rect.size.x * .5f;
561 boundsCenter.x -= rect.size.x * .5f;
564 boundsCenter.y -= rect.size.y * .5f;
566 boundsCenter.y += rect.size.y * .5f;
571 parentTransform.translation = parentTranslation;