EzDevInfo.com

cube

跨终端、响应式、低设计耦合的CSS解决方案 Cube - Cube 样式解决方案 - THX

Blurring a cubemap

Any ideas how to do it? Now i have dynamically generated cubemap, which i use as a reflection texture on torus.

Blurring every side separately won't do the trick, right? Because of pixels near the border, which won't get blur impact from their neighbours.

Maybe i should make another FBO, bind it, "unroll" cubemap on the screen, apply basic blur shader and then separate that blurred texture into 6 sides? Not sure how to do the "separate" part.


Source: (StackOverflow)

Find a line connecting two faces of a cubic volume

Imagine a volumetric cube of N³ resolution that is filled with occluding voxels. The cube could be completely filled, or contain curvy "tunnels", or walls - or just a few stray voxels; We now pick any two of the six faces of the bounding cube and attempt to find a line that connects those two faces without hitting any voxel inside it. If such a line exists, the faces can see each other, otherwise, they're completely occluded.

My question is: does an O(n) (or better) algorithm exist to quickly discern if such a line can be drawn? The exact parameters of the line do not matter.


Source: (StackOverflow)

Advertisements

How to plot 3D grid (cube) in Matlab

Hi I would like to plot transparent cube-shaped grid with lines in it. Something like this: enter image description here

However, I managed only to draw a 2D grid:

[X,Y] = meshgrid(-8:.5:8);
Z = X+1;
surf(X,Y,Z)

I use Matlab R2009b. If it is impossible to plot this in matlab could you recommend me a software I could use.


Source: (StackOverflow)

Browsing OLAP cubes

Does anybody know any fine open source cube browser?

Ideally, it would be something built with plain javascript.

Does it even exists?

I'm planing to use it with classic asp agains a SQL database.


Source: (StackOverflow)

What is the most efficient way to draw voxels (cubes) in opengl?

I would like to draw voxels by using opengl but it doesn't seem like it is supported. I made a cube drawing function that had 24 vertices (4 vertices per face) but it drops the frame rate when you draw 2500 cubes. I was hoping there was a better way. Ideally I would just like to send a position, edge size, and color to the graphics card. I'm not sure if I can do this by using GLSL to compile instructions as part of the fragment shader or vertex shader.

I searched google and found out about point sprites and billboard sprites (same thing?). Could those be used as an alternative to drawing a cube quicker? If I use 6, one for each face, it seems like that would be sending much less information to the graphics card and hopefully gain me a better frame rate.

Another thought is maybe I can draw multiple cubes using one drawelements call?

Maybe there is a better method altogether that I don't know about? Any help is appreciated.


Source: (StackOverflow)

.Net OLAP Cube Explorer control with HTML5 mobile compatibility [closed]

I'm currently looking for control suite that supports mobile business intelligence reporting. The mobile BI site will be a complimentary site for an existing SharePoint BI solution that presents SSRS / PerformancePoint information to the user.

The mobile site should allow users to view pivot grids of information sourced from an OLAP cube as well as normal SQL query results of information. The controls present on the mobile site should be completely compatible with iOS, Android and WinPhone devices as the information will primarily be used on mobile devices by users who are often off-site.

At the moment, the only control suite I can find that seems to fit the bill is the ComponentArt suite for mobile dashboarding.

I had a look at Telerik / Infragistics but neither have any native OLAP cube controls.

Does anyone else have any other suggestions that I can investigate?

Thanks, Brian.


Source: (StackOverflow)

Oracle - Group by Cube - Sum by distinct column

Sample data:

product_type |segment_type  |promotion_id  |promotion_value
-----------------------------------------------------------
Beer         |Regional      |1             |20
Beer         |National      |1             |20
Beer         |Regional      |2             |20
Beer         |National      |2             |20
Beer         |National      |3             |30
Beer         |Regional      |4             |40
Soda         |Regional      |5             |50
Soda         |National      |5             |50
Soda         |Regional      |6             |50
Soda         |National      |6             |50
Soda         |National      |7             |15
Soda         |Regional      |8             |20

Objective: Get the total promotion value grouped by product_type and segment_type (cube) considering distinct promotions. Note that a single promotion can reach one or both segments (Regional and National).

Desired result:

product_type   |segment_type    |promotion_value
-------------------------------------------------
Beer           |                |110
Beer           |Regional        |80
Beer           |National        |70
Soda           |                |135
Soda           |Regional        |120
Soda           |National        |115

My current SQL is as follows:

SELECT product_Type,
       segment_type,
       sum(promotion_value)promotion_value
  from sample_data
 group by product_type,
          cube(segment_type)

The current result is:

product_type   |segment_type    |promotion_value
-------------------------------------------------
Beer           |                |150
Beer           |Regional        |80
Beer           |National        |70
Soda           |                |235
Soda           |Regional        |120
Soda           |National        |115

SQLFiddle: link

Is there a way to achieve the desired result?


Source: (StackOverflow)

What is Z in a 3D universe?

I'm creating a 3D renderer in Java, which currently can render the wireframe of a cube using Points and lines and rotate the cube, the question is, what should Z be? And what should be set to Z? I'm guessing that the size of the cube should be set to Z?

Thanks for your time! Any answers would be much appreciated.


Source: (StackOverflow)

MDX SSAS - Max Date in Measure

Just need to get MAX date in ALL my Measures in the Cube. For instance, DateID is a Dimention, [Measure].[First Measure],...,...,[Second Measure].

How to get list of MAX(DateID) from all Measures in my Cube.


Source: (StackOverflow)

Using Filter on measures in MDX query on SSRS

i've creted a report using a cube as datasource and MDX query on my dataset. i have a few measures in my dataset but i want to show wonly the rows with at least one of the measures > 0, using something like an OR filter (measure1 >0 or measure 2 >0 ..etc) how can i do this?

thanks


Source: (StackOverflow)

HOWTO create OpenGL ES 2.0 SkyBox?

Can you give me hint to any good SkyBox example in OpenGL ES 2.0? I have found only OpenGL and does not work for me. I am doing it this way: Initialization:

glUseProgram(m_programSkyBox.Program);
glGenBuffers(1, &skyBoxVertexBuffer);
glBindBuffer(GL_ARRAY_BUFFER, skyBoxVertexBuffer);


float vertices[24] = {  
    -1.0, -1.0,  1.0,
    1.0, -1.0,  1.0,
    -1.0,  1.0,  1.0,
    1.0,  1.0,  1.0,
    -1.0, -1.0, -1.0,
    1.0, -1.0, -1.0,
    -1.0,  1.0, -1.0,
    1.0,  1.0, -1.0,
};

glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);

glGenBuffers(1, &skyBoxIndexBuffer);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, skyBoxIndexBuffer);


GLubyte indices[14] = {0, 1, 2, 3, 7, 1, 5, 4, 7, 6, 2, 4, 0, 1};
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, GL_STATIC_DRAW);

Drawing the skybox:

glClearColor(0.5f, 0.5f, 0.5f, 1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glUseProgram(m_programSkyBox.Program);

glDisable(GL_DEPTH_TEST);   // skybox should be drawn behind anything else
glBindTexture(GL_TEXTURE_CUBE_MAP, m_textures.Cubemap);


glBindBuffer(GL_ARRAY_BUFFER, skyBoxVertexBuffer);
glVertexAttribPointer(m_programSkyBox.Attributes.Position, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
glEnableVertexAttribArray(m_programSkyBox.Attributes.Position);
glBindBuffer(GL_ARRAY_BUFFER, 0);

glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, skyBoxIndexBuffer);
glDrawElements(GL_TRIANGLE_STRIP, 14, GL_UNSIGNED_BYTE, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glEnable(GL_DEPTH_TEST);

Texture loading is working. Shader is correctly compiled and looks like this: Vertex shader:

attribute vec4 position;
varying mediump vec3 texCoord;
void main() {
   texCoord.xyz = position.xyz;
}

Fragment shader:

uniform samplerCube Sampler;

varying mediump vec3 texCoord;

 void main() {
     mediump vec3 cube = vec3(textureCube(Sampler, texCoord.xyz));
     gl_FragColor = vec4(cube, 1.0);
 }

But I cant get cube visible. Am I doing anything wrong? Thank you


Source: (StackOverflow)

Label color under the identity inspector in Xcode 4

under Identity Inspector as we all know that the label property is used to identify objects easier in interface builder, but what are the colors to the bottom of it used for ? I tried to select a color but nothing changed in interface builder.

EDIT: screenshot:

enter image description here


Source: (StackOverflow)

SSAS 2012 cube browser- how can I create columns from dimensions?

I am new to SSAS, and have created a cube in SSAS 2012.

When I browse the cube, I can easily at my dimensions as rows, but how do I add them as columns? In previous versions (I have access to a Cube created in 2008), when you browse the cube, you can drag dimensions into either columns or rows.

Have I setup my cube incorrectly?


Source: (StackOverflow)

Creating SSAS 2008 cube partitions using Powershell?

How can we create SSAS 2008 cube partitions using Powershell?


Source: (StackOverflow)

3D Cube problem, Part 2

This is my 2nd Question on 3D cubes in iphone using CALayer, Core Animation framework, written in Objective-c. For my first question please visit here 3D Cube Problem! Part 1.

I am using Brad Larsons code to rotate my 3D cube from this link

http://www.sunsetlakesoftware.com/2008/10/22/3-d-rotation-without-trackball

The problem is my cube is rotating in x axis along the pink line shown in the figure.

enter image description here

But I want to rotate it around x axis along the black line shown in the figure.
Now in my code I dont have any pink line or black line drawn on my view so can some one please help me with this.

If it helps here is the code for rotating my cube in touchesMoved: method

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 
{
    CGPoint location = [[touches anyObject] locationInView:self];
    CATransform3D currentTransform = currentLayer.sublayerTransform;
    CGFloat displacementInX = location.x - previousLocation.x;
    CGFloat displacementInY = previousLocation.y - location.y;
    CGFloat totalRotation = sqrt(displacementInX * displacementInX + displacementInY * displacementInY);
    CGFloat x = (displacementInX/totalRotation) * currentTransform.m12 + (displacementInY/totalRotation) * currentTransform.m11;
    CATransform3D rotationalTransform = CATransform3DRotate(currentTransform, totalRotation * M_PI / 180.0, x, y, 0);
    currentLayer.sublayerTransform = rotationalTransform;
}

previousLocation is a CGPoint initialized in touchesBegan: method, and currentLayer is CALayer where I have created this cube.

Thanks for your help.

PS. If you want to know how I created this cube then let me know


Source: (StackOverflow)